摘要:
import numpy as npimport matplotlib.pyplot as pltx_data=[1,2,3]y_data=[2,4,6]w=1def forword(x): return x*w #linear modeldef cost(xn,yn): #平均损失函数 cost= 阅读全文
摘要:
import numpy as npimport matplotlib.pyplot as pltx_data=[1,2,3]y_data=[2,4,6]def forword(x): return x*wdef loss(x,y): y_pred=forword(x) return (y_pred 阅读全文