摘要: 本篇是摘抄pytorch-handbook里面的,有兴趣可以看看。 损失函数(Loss Function) 损失函数(loss function)是用来估量模型的预测值(我们例子中的output)与真实值(例子中的y_train)的不一致程度,它是一个非负实值函数,损失函数越小,模型的鲁棒性就越好。 阅读全文
posted @ 2020-06-29 17:30 九叶草 阅读(6982) 评论(0) 推荐(0) 编辑
摘要: import torch x = torch.rand(2,2) x1 = x.numpy() # torch转换到numpy x2 = torch.from_numpy(x1) #numpy转换torch print("\n torch_x:\n",x, "\n numpy_x1:\n",x1, 阅读全文
posted @ 2020-06-29 16:40 九叶草 阅读(9337) 评论(0) 推荐(0) 编辑
摘要: 官方文档 首先我们要知道,lmplot是用来绘制回归图的。 让我们来看看他的API: seaborn.lmplot(x, y, data, hue=None, col=None, row=None, palette=None, col_wrap=None, height=5, aspect=1, m 阅读全文
posted @ 2020-06-29 11:40 九叶草 阅读(12853) 评论(0) 推荐(3) 编辑