如何在Google Colab上安装PyTorch v1.0.0 +? [英] How do I install PyTorch v1.0.0+ on Google Colab?
本文介绍了如何在Google Colab上安装PyTorch v1.0.0 +?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PyTorch v1.0.0稳定版在2018年12月8日发布正在 7个月前宣布.
PyTorch v1.0.0 stable was released on 8 December 2018 after being announced 7 months earlier.
我想要为运行IPython内核的硬件优化版本.
I want get a version optimised for the hardware that my IPython kernel is running on.
如何在Google Colab上获取此版本?
How do I get this version on Google Colab?
推荐答案
尝试以下代码段(无论是否带有gpu,它在运行时均适用)
try the following code snippet (it works equally for the runtime with or without gpu)
!pip install -q torch==1.0.0 torchvision
检查版本
import torch
print(torch.__version__)
您的版本为1.0.0
here you have the version 1.0.0
更新
!pip install torch
现在可以正常工作,因为最稳定的版本是1.0.0
Works fine now, as the most stable version is 1.0.0
这篇关于如何在Google Colab上安装PyTorch v1.0.0 +?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文