摘要: 本文基于PyTorch,搭建了神经网络,实现了对气温的预测。 (1)读入数据 features = pd.read_csv('temps.csv')#其中共348条数据,每条数据有9个特征 (2)预处理数据 处理时间数据 # 处理时间数据,方便操作 import datetime # 分别得到年,月 阅读全文
posted @ 2023-05-16 17:10 Frommoon 阅读(302) 评论(3) 推荐(0) 编辑
摘要: 初识pytorch,本文基于pytorch构建最基本的神经网络,实现线性回归模型。 (1)构造一组输入数据X和其对应的标签y x_values = [i for i in range(11)] x_train = np.array(x_values, dtype=np.float32)#np.arr 阅读全文
posted @ 2023-05-16 11:30 Frommoon 阅读(114) 评论(0) 推荐(0) 编辑