刘二大人pytorch教程课后作业(03—1)——梯度下降算法
import matplotlib.pyplot as plt
#############################################################梯度下降算法
# prepare the training set
x_data [1.0, 2.0, 3.0]
y_data [2.0, 4.0, 6.0]# initial guess of weight
w 1.0# define the model linear model y w*x
def f…
2026/6/26 21:39:10