![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
Evan Yi
不忘初心,砥砺前行!
展开
-
SourceChangeWarning: source code of class ‘__main__.CNN‘ has changed. you can retrieve the original
C:\ProgramData\Anaconda3\envs\ywx_pytorch_env\lib\site-packages\torch\serialization.py:453: SourceChangeWarning: source code of class '__main__.CNN' has changed. you can retrieve the original source c...原创 2020-04-17 01:46:56 · 7081 阅读 · 3 评论 -
RuntimeError: Error(s) in loading state_dict for Net: Missing key(s) in state_dict: "fc1.weight", "
在载入模型参数前加上:model = nn.DataParallel(model)还有错误如:IncompatibleKeys(missing_keys=[], unexpected_keys=[])或者错误:RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0...原创 2020-01-15 02:53:05 · 1248 阅读 · 0 评论 -
pip install和conda install的区别
https://www.anaconda.com/understanding-conda-and-pip/conda install能安装的包范围比pip install大conda软件包不限于Python软件。它们可能还包含C或C ++库,R软件包或任何其他软件conda安装的时候会安装所有依赖,pip不会https://blog.csdn.net/taopanpantao...原创 2019-12-19 21:38:34 · 3339 阅读 · 0 评论 -
pytorch+python3.6+cuda90+cudnn7离线快速安装过程
官网方法太慢,网速不行的时候经常掉线,故采用离线安装1、先去清华镜像下载pytorch安装包https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/选择适合自己电脑的版本,下载到本地2、为了不与其他环境冲突,最好自己新建一个虚拟环境可以利用anaconda navigator新建,当然也可以直接用命令...原创 2019-12-19 20:09:52 · 1811 阅读 · 0 评论 -
pytorch学习记录
转载于:https://blog.csdn.net/dpppBR/article/details/78659338大多数的代码都来自https://morvanzhou.github.io/tutorials/machine-learning/torch只是自己入门pytorch随便记得东西,然后随手扔上来(markdown都不用了,懒懒懒tensor:import torchdata...转载 2019-04-07 10:46:18 · 105 阅读 · 0 评论 -
pytorch测试的时候为何要加上model.eval()
Do need to use model.eval() when I test? Sure, Dropout works as a regularization for preventing overfitting during training.It randomly zeros the elements of inputs in Dropout layer on forward call...转载 2019-04-07 11:08:46 · 5101 阅读 · 0 评论