3
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PyTorch導入(仮想環境)

Last updated at Posted at 2017-06-22

pytorch導入方法だけ

開発環境
OS: Ubuntu 16.04
Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz
グラボ:GeForce GTX 1080 × 2
cuda 8.0
cudnn 5.1

本家はここ
http://pytorch.org/

参考(むしろここで十分)
http://kazuto1011.github.io/irvs-tutorials/mnist/pytorch/

以下全てterminal上のコマンド
#python2系の場合
pytorch2という名前の仮想環境構築(仮想環境名は自由)

conda create -n pytorch2 python=2.7.11 -y

仮想環境を有効にする

source activate pytorch2

pytorchをインストール

conda install pytorch torchvision -c pytorch

導入を確認

python
import torch

importでエラーが出なかったら導入完了
色々閉じる

exit()
source deactivate

#python3系の場合
pytorch3という名前の仮想環境構築(仮想環境名は自由)

conda create -n pytorch3 python=3.5.1 -y

仮想環境を有効にする

source activate pytorch3

pytorchをインストール

conda install pytorch torchvision -c pytorch

導入を確認

python
import torch

importでエラーが出なかったら導入完了
色々閉じる

exit()
source deactivate
3
6
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
3
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?