【2018-04-25 更新】PyTorch 0.4.0版本横空问世!!!




一、重大核心变化包括

*
Tensor/Variable 合并

*
零维张量

*
数据类型

*
迁移指南




二、现添加的新特征包括

*
Tensors:

* 全面支持高级索引
* 快速傅立叶变换
*
神经网络:

* 计算时的存储权衡
* bottleneck-识别代码中热点(hotspots)的工具
*
torch.distributions


* 24 个基础的概率分布
* 增加cdf、方差、信息熵、困惑度等
*
分布式训练


* 易于使用的 Launcher utility
* NCCL2 后端
*
C++拓展

*
Windows 支持

*
ONNX 改进

* RNN 支持


三、性能改进




四、Bug 修复


五、torchvision的一些变化

1.torchvision.transform中函数torchvision.transforms.Scale(*args, **kwargs)即将被函数
torchvision.transforms.Resize(size, interpolation=2)代替。(参考官方文档:点击打开链接
<http://pytorch.org/docs/stable/torchvision/transforms.html#torchvision.transforms.Resize>


2.torchvision.transform中函数torchvision.transforms.RandomSizedCrop(*args, 
**kwargs)即将被函数torchvision.transforms.RandomResizedCrop(size, scale=(0.08, 1.0), 
ratio=(0.75, 1.3333333333333333), interpolation=2)代替。(参考官方文档:点击打开链接
<http://pytorch.org/docs/stable/torchvision/transforms.html#torchvision.transforms.RandomResizedCrop>





六、安装方式——Windows安装

【方法一】pip直接安装。官网(点击打开链接 <http://pytorch.org/>
)给出的安装步骤如下图所示(根据CUDA版本以及Python版本选择)。







【方法二】利用源文件安装。GitHub说明中给出的方法(点击打开链接
<https://github.com/pytorch/pytorch/tree/v0.4.0#install-pytorch>)。注意必须安装有VS2017!
(官方还给出了NVTX,但是我并没有找到相关的下载。。。)


(1)首先安装必须的包:
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing

(2)然后从GitHub上克隆:
git clone --recursive https://github.com/pytorch/pytorch

(3)最后在windows命令提示行或者powershell中执行:
set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\VC\Auxiliary\Build" set CMAKE_GENERATOR=Visual Studio 15
2017 Win64 set DISTUTILS_USE_SDK=1 REM The following line is needed for Python
2.7, but the support for it is very experimental. set MSSdk=1 call
"%VS150COMNTOOLS%\vcvarsall.bat" x64 -vcvars_ver=14.11 python setup.py install

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信