
pytorch系列
andeyeluguo
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用清华镜像快速使用conda安装pytorch
直接复制运行下面脚本 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anac原创 2020-11-18 16:45:20 · 917 阅读 · 0 评论 -
不同GPU上的tensor不能同时操作
比如 a = torch.rand(2,3).cuda('cuda:0') b = torch.rand(2,3).cuda('cuda:1') a*b 上面代码片段将会报不在同一个GPU上不能操作。 这个MarkDown笔记挺好用的,以后就用他了,不知道和vim有什么区别,写起来不那么手忙脚乱了,不像富文本编辑器一样。 ...原创 2019-11-22 20:23:03 · 388 阅读 · 0 评论 -
pytorch使用清华源安装
今天安装pytorch1.0.0,发现下载一下就断了,提示,忘了。现在使用清华源可以正常安装。 清华源原来不能用,现在能用了。 使用方法见 欢呼、雀跃,Anaconda 清华源又回来了! 按照步骤来就行,注意使用源的时候删除 -c pytorch pytorch previous 版本安装 ...原创 2019-11-22 20:12:34 · 1024 阅读 · 1 评论 -
pytorch 重用loss
import torch torch.nn.MSELoss() >>> a = torch.rand(3) >>> a tensor([0.2161, 0.2227, 0.9175]) >>> b = torch.rand(3) >>> b tensor([0.6976, 0.9149, 0.4918]) >>...原创 2019-11-20 20:20:28 · 166 阅读 · 0 评论 -
pytorch系列1之 预备
1.优点 可以自动计算梯度 调试方便 动态图 2.安装 我安装的是pip管理,cuda8.0,python2.7 安装的代码为 pip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp27-none-linux_x86_64.whl pip install torchvision 这原创 2017-10-10 11:10:21 · 266 阅读 · 0 评论