如何在 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屋!
查看全文