TensorFlow (GPU) > v1.2.1からv1.7.0へのアップデート | v1.7.0での動作確認 | 注意事項 | Link:TensorFlowのReleaseごとの変更内容

動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04.4 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)
ADDA v.1.3b6
gnustep-gui-runtime v0.24.0-3.1

TensorFlowはv1.2.1を使用してきたが、2018年3月31日現在最新のv1.7.0を試したくなった。
v1.7.0にしてみる。

関連

手順

上記のリンクの手順とほぼ同じ。

違う部分は以下。

$ sudo pip3 uninstall tensorflow

(sudoがないと権限関連で失敗したため)

$ sudo pip3 install --upgrade tensorflow==1.7.0

(v1.7.0とした)

v1.7.0での動作確認

learn_mr_mi_170819.py

Ubuntu > Ubuntu 16.04.3 LTSをUbuntu 16.04.4 LTSにアップデートする | TensorFlowの環境はそのままに | dist-upgradeは未実施
で動作確認に使用した自作コードを実行してみた。

エラーなく実行された。

autoencoder.py

TensorFlow v1.2.1 > AutoEncoderを実行してみた
Jupyter Notebookで.iypnbとして実行。

下記のWARNING:が出るようにはなったが、Reconstructed Imagesの生成まで成功した。

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
WARNING:tensorflow:From <ipython-input-1-267466e5c1c7>:25: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:260: maybe_download (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Please write your own downloading logic.
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:262: extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting /tmp/data/train-images-idx3-ubyte.gz
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:267: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting /tmp/data/train-labels-idx1-ubyte.gz
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:110: dense_to_one_hot (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.one_hot on tensors.
Extracting /tmp/data/t10k-images-idx3-ubyte.gz
Extracting /tmp/data/t10k-labels-idx1-ubyte.gz
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:290: DataSet.__init__ (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.
Step 1: Minibatch Loss: 0.449974
Step 1000: Minibatch Loss: 0.150371
Step 2000: Minibatch Loss: 0.135557
Step 3000: Minibatch Loss: 0.124476
Step 4000: Minibatch Loss: 0.113059
Step 5000: Minibatch Loss: 0.104524

注意事項

TensorFlow v1.2.1 > cifar10_train.py > Error: ImportError: No module named 'tensorflow.models' > 古いバージョンのTensorFlow用コード | 動作環境の記載

TensorFlow v0.11からv1.2.1にする過程でcifar10_train.pyがエラーになる経験はしている。

上記で自分の使うものの一部を動作確認したが、未確認の部分ではバージョン変更によるソース修正は必要になるかもしれない。

変更内容は下記に記載されている。
https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md

Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.