
pytorch
CYummy
这个作者很懒,什么都没留下…
展开
-
Ubuntu16.04 安装python3.6和相应的pip3 pytorch1.0
Ubuntu16.04系统自带python2.7和python3.5,系统自带的python环境不建议更改。 如果想用python3.6可以手动安装。 1、python3.6安装 安装命令 sudo apt-get install software-properties-common sudo add-apt-repository ppa:jonathonf/python-3.6 sud...原创 2019-03-05 14:21:35 · 3664 阅读 · 0 评论 -
pytorch之numpy,tensor,variable转换
转载:https://www.e-learn.cn/content/qita/722866 1、将numpy矩阵转换为Tensor张量 locs= torch.from_numpy(loc) #loc为numpy类型 2、将Tensor张量转化为numpy矩阵 locs1 = locs.numpy() 3、将numpy转换为Variable locs2...转载 2019-03-25 15:14:29 · 1462 阅读 · 0 评论