pytorch 1.1.0升级
利用PyTorch进行深度学习编程实践 #生活技巧# #学习技巧# #深度学习技巧#
Pytorch 1.1.0Pytorch 1.1.0于2019-05-01发布,详情见https://github.com/pytorch/pytorch/releases/tag/v1.1.0
注: 不再支持CUDA8.0
概述:官方TensorBoard支持,属性,字典,列表和JIT / TorchScript中用户自定义的类型,改进了分布式
Highlights:
TensorBoard (试验阶段)使用TensorBoard(一个用于检查和理解训练运行、张量和图的web应用程序组件)对可视化和模型调试提供了一流的本机支持。PyTorch现在可通过一个简单的命令from torch.utils.tensorboard import SummaryWriter支持TensorBoard日志记录。直方图、嵌入、标量、图像、文本、图形,以及更多可以在训练过程中可视化。目前,TensorBoard支持还处于试验阶段。
[JIT] Attributes in ScriptModules[JIT] TorchScript中支持字典和列表[JIT] TorchScript中的用户定义类(试验阶段) 可以用@torch.jit.script注释DistributedDataParallel新功能和教程:nn.parallel.distributeddataparparallel现在可以封装多gpu模块,它支持在一台服务器上使用模型并行(教程)和跨服务器进行数据并行(教程)等用例。重大更新:
Tensor.set_: Tensor的设备不能再通过Tensor.set_.来改变。这通常发生在使用默认CUDA设备设置张量,然后在另一个CUDA设备上交换存储时。相反,从一开始就在正确的装置上建立Tensor (18832).注意顺序更改lr_scheduler.step(). (7889).torch.unique: 更改sorted默认值为 True. (15379).[JIT] 重命名 isTensor api -> isCompleteTensor. #18437[JIT] 移除GraphExecutor的python绑定. #19141[C++]: Type 上的许多方法已不复存在;使用等价的函数法或张量法。 (17991).[C++]: TensorOptions的后端构造函数不再存在. (18137).[C++, Distributed]: 已删除 c10d ProcessGroup::getGroupRank (19147). Pytorch1.0.1Pytorch1.0.1于2019-2-7发布,详情见https://github.com/pytorch/pytorch/releases/tag/v1.0.1,
修复了很多bugJIT Add better support for bools in the graph fuser (#15057)Allow tracing with fork/wait (#15184)improve script/no script save error (#15321)Add self to Python printer reserved words (#15318)Better error when torch.load-ing a JIT model (#15578)fix select after chunk op (#15672)Add script standard library documentation + cleanup (#14912) 性能优化 LibTorch binaries now ship with CuDNN enabled. Without this change, many folks saw significant perf differences while using LibTorch vs PyTorch, this should be fixed now. #14976Make btriunpack work for high dimensional batches and faster than before (#15286)improve performance of unique with inverse indices (#16145)Re-enable OpenMP in binaries (got disabled because of a CMake refactor) Pytorch 1.0Pytorch 1.0于2018-12-8发布,详见https://github.com/pytorch/pytorch/releases/tag/v1.0.0
主要更新 JIT全新的分布式训练包:torch.distributed 旧的接口放到了 torch.distributed.deprecated 中C++ 接口 API [尚不稳定]Torch HUB:各种预训练模型集合重点更新 众多新特性 增加了对 N 维空的 tensor 的支持众多新的 tensor 操作新的分布函数对稀疏数据处理的 API 的改进修复了众多bug,比如 torch.nn.functional.softmin 在 0.4.1 里的公式是错的,torch.nn.MSELoss 有时候计算错误等等众多改进废弃的方法 不再支持 C 接口不再支持 torch.utils.trainer性能优化 升级本文中pytorch由0.4.0升级到1.0.1,再升级至1.1.0(也可以直接升级至1.1.0)
1. 首先用如下命令查看升级前的pytorch版本,返回版本号是0.4.0
python -c "import torch; print(torch.__version__)"
2. 输入如下命令 conda install pytorch torchvision -c pytorch进行升级
conda install pytorch torchvision -c pytorch
3. 升级后再用1中的命令查看一下升级后的pytorch版本,返回是1.0.1表示升级成功。
4. 重复1-3的步骤可以将pytorch1.0.1再次升级至1.1.0
Note:
在Windows+Python 3.7+CUDA10环境下安装PyTorch 1.2.0的命令如下:
pip install torch==1.2.0 -f https://download.pytorch.org/whl/cu100/torch-1.2.0-cp37-cp37m-win_amd64.whl
Python3.6, CUDA92环境下安装PyTorch1.3的命令为:
pip install torch==1.3.1 -f https://download.pytorch.org/whl/torch_stable.html
参考资料:
1. https://www.pytorchtutorial.com/pytorch-1-0/
2. https://github.com/pytorch/pytorch
3. https://download.pytorch.org/whl/torch_stable.html
4. https://github.com/pytorch/pytorch/issues/30631
网址:pytorch 1.1.0升级 https://www.yuejiaxmz.com/news/view/231590
相关内容
PyTorch创建虚拟环境并,创建pytorch 1.3.1
深入了解PyTorch中的语音识别和语音生成
pytorch中的model=model.to(device)使用说明
语音识别与合成:PyTorch实践
如何使用OTA控制台升级固件
PyTorch项目实战开发教程:智能家居控制中心(python智能家居开发)
智能座舱操作系统全面优化,领克不负用户期待
深入理解PyTorch的语音识别与语音合成1.背景介绍 语音识别和语音合成是人工智能领域中的两个重要技术,它们在现实生活
小森生活如何升级到3级厨房 3级厨房升级条件