深度学习之梯度下降算法这里案例是用梯度下降算法,来计算 y = w * x 先计算出梯度,再进行梯度的更新Predict (befortraining) 4 4.0 Epoch: 0 w= 1.15 cost= 7.5 Epoch: 1 w= 1.2774999999999999 cost= 5.418750000000001 Epoch: 2 w= 1.385875 cost= 3.9150468750000016 Epoch: 3 w= 1.47799375 cost= 2.828621367187501 Epoch: 4