![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
文章平均质量分 82
如果曾经拥有
这个作者很懒,什么都没留下…
展开
-
PyTorch - autograd - One of the differentiated Tensors appears to not have been used in the graph
参考资料Example for One of the differentiated Tensors appears to not have been used in the graph - #3 by Sudarshan_VB - autograd - PyTorch Forumsallow_unused=True - 知乎pytorch 踩坑记录_kdh的专栏-CSDN博客python - Pytorch gradient error: nonetype unsupported opera转载 2022-03-14 08:48:51 · 8976 阅读 · 3 评论 -
pytorch - data process - 赋值
referencehttps://icepoint666.github.io/2019/05/27/pytorch-clone/https://tangshusen.me/Dive-into-DL-PyTorch/#/chapter02_prerequisite/2.2_tensor?id=_222-%e6%93%8d%e4%bd%9c直接赋值 tensor 易错点torch中对于直接赋值的这种操作一定要小心,先看看是不是需要直接赋值,还是重新开辟一块内存来存放 我们可以使用类似Nu.转载 2021-03-27 09:29:48 · 739 阅读 · 0 评论 -
pytorch - nn.ModuleList & nn.Sequential
sourcehttps://zhuanlan.zhihu.com/p/64990232summaryModuleList 就是一个储存各种模块的 list,这些模块之间没有联系,没有实现 forward 功能,但相比于普通的 Python list,ModuleList 可以把添加到其中的模块和参数自动注册到网络上。Sequential 内的模块需要按照顺序排列,要保证相邻层的输入输出大小相匹配,内部 forward 功能已经实现,可以使代码更加整洁。nn.Module...转载 2021-02-14 22:23:52 · 855 阅读 · 0 评论 -
PyTorch - backward - model.train() model.eval() || model.eval() torch.no_grad()
model.train() model.eval()Remember that you must call model.eval() to set dropout and batch normalization layers to evaluation mode before running inference. Failing to do this will yield inconsistent inference results. If you wish to resuming trainin转载 2021-02-02 17:34:56 · 360 阅读 · 0 评论 -
Windows 10 下使用Anaconda安装pytorch
Pytorch是一个用户友好的python的深度学习框架,类似于tensorflow,Caffe,keras。目前,Pytorch可支持windows,linux,mac系统。本人的安装环境是:操作系统 Win10,已经安装过 Anaconda (anaconda的安装可以自行google),pytorch的cpu版本。打算安装GPU版本的,“需要先安装cuda,再根据cuda相应版本...原创 2019-09-11 11:33:50 · 527 阅读 · 0 评论