LoginSignup
5
5

More than 5 years have passed since last update.

Google ColaboratoryでPyTorchを使おう

Posted at

ほぼ身内向けですが忘れっぽい人のために。。。

Google Colaboratoryにアクセス

colab上でコマンドを打つときは先頭に!を付ける必要があります。

  • 新規python3ノートブックを作る
  • pythonのバージョン確認
    !python --version
  • cudaのバージョン確認
    !ls /usr/lib/x86_64-linux-gnu/libcuda*
  • 確認できたらPyTorchのダウンロードページにてダウンロード方法を選択
  • PyTorchをインストール
    一例: !pip3 install torch torchvision
  • インポートできるか確認
    import torch
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5