SSE、AVX、FMAなどのプラットフォームの最適化により、Tensorflow用のカスタムビルド。ストックpip install tensorflow 、次のようなメッセージが表示されている場合は、正しい場所に来ます。
The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
or:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
これらのホイールは、クラウドマシン学習プラットフォームであるTinymindで使用するために構築されています。独自のLinuxボックス(Ubuntu 16.04 LTS)にそれらをインストールしたい場合は、次のことを行うことができます。
# RELEASE is the git tag like tf1.1-cpu. WHEEL is the full wheel name.
pip --no-cache-dir install https://github.com/mind/wheels/releases/download/{RELEASE}/{WHEEL}すべてのホイールのリストは、リリースページにあります。
以下のリンクをクリックして、特定のリリースバージョンにジャンプします。繰り返しますが、特に明記しない限り、Ubuntu 16.04 LTS用に構築されます。
| TF | ビルド |
|---|---|
| 1.1 | CPU、GPU |
| 1.2 | CPU、GPU(Python 3.6のみ) |
| 1.2.1 | CPU、GPU |
| 1.3 | CPU、MPI付きGPU |
| 1.3.1 | CPU、CPUデバッグ、GPU、MPI付きGPU |
| 1.4 | CPU、CPUデバッグ、CPU MACOS、GPU(CUDA 8、CUDA 9 COUDA 9、CUDA 9 COUDA 9はMKLなしでCUDA 9ジェネリック、CUDA 9) |
| 1.4.1 | CPU、GPU(CUDA 8、CUDA 9、CUDA 9.1) |
| 1.5 | CPU、GPU(CUDA 9、MKLなしのCUDA 9、CUDA 9.1、CUDA 9.1 MKLなし) |
| 1.6 | CPU、GPU(CUDA 9.1、CUDA 9.1 MKLなし) |
| 1.7 | CPU、GPU(Cuda 9、Cuda 9.1、Cudnn 7.1) |
マシンには、以下のホイールと互換性があるために、比較的新しいIntel CPU(およびGPUバージョンを使用する場合はNvidia GPU)が必要であることに注意してください。ハードウェアが最新でない場合、ホイールは機能しません。
Tensorflow 1.4.1以上のホイールには、GCP、S3、およびHadoopのサポートが含まれています。コンピレーションフラグには次のものが含まれます。
--config=opt --config=cuda --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 --copt=-mavx --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both
必要なホイールは、以下にリストされています。何かが必要ですか、ホイールはあなたのために働きませんか?問題を提出します。 (残念ながら、Windows Machinesが自分でないため、Windowsホイールのリクエストに対応することはできません。)
| バージョン | Python | アーチ | リンク |
|---|---|---|---|
| 1.1 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.1-cpu/tensorflow-1.1.0-cp27-cp27mu-linux_x86_64.whl |
| 1.1 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.1.1-cpu/tensorflow-1.1.0-cp35-cp35m-linux_x86_64.whl |
| 1.1 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.1-cpu/tensorflow-1.1.0-cp36-cp36m-linux_x86_64.whl |
| 1.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.1-gpu/tensorflow-1.1.0-cp27-cp27mu-linux_x86_64.whl |
| 1.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.1-gpu/tensorflow-1.1.0-cp35-cp35m-linux_x86_64.whl |
| 1.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.1-gpu/tensorflow-1.1.0-cp36-cp36m-linux_x86_64.whl |
| 1.2 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.2-cpu/tensorflow-1.2.0-cp27-cp27mu-linux_x86_64.whl |
| 1.2 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.2-cpu/tensorflow-1.2.0-cp35-cp35m-linux_x86_64.whl |
| 1.2 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.2-cpu/tensorflow-1.2.0-cp36-cp36m-linux_x86_64.whl |
| 1.2 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.2-gpu/tensorflow-1.2.0-cp36-cp36m-linux_x86_64.whl |
| 1.2.1 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.2.1-cpu/tensorflow-1.2.1-cp27-cp27mu-linux_x86_64.whl |
| 1.2.1 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.2.1-cpu/tensorflow-1.2.1-cp35-cp35m-linux_x86_64.whl |
| 1.2.1 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.2.1-cpu/tensorflow-1.2.1-cp36-cp36m-linux_x86_64.whl |
| 1.2.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.2.1-gpu/tensorflow-1.2.1-cp27-cp27mu-linux_x86_64.whl |
| 1.2.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.2.1-gpu/tensorflow-1.2.1-cp35-cp35m-linux_x86_64.whl |
| 1.2.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.2.1-gpu/tensorflow-1.2.1-cp36-cp36m-linux_x86_64.whl |
| 1.3 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp27-cp27mu-linux_x86_64.whl |
| 1.3 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp35cp35m-linux_x86_64.whl |
| 1.3 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl |
| 1.3 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.3-gpu/tensorflow-1.3.0-cp27-cp27mu-linux_x86_64.whl |
| 1.3 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.3-gpu/tensorflow-1.3.0-cp35m-linux_x86_64.whl |
| 1.3 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.3-gpu/tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl |
| 1.3.1 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.3.1.cpu/tensorflow-1.3.1-cp27-cp27mu-linux_x86_64.whl |
| 1.3.1 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.3.1.cpu/tensorflow-1.3.1-cp35cp35m-linux_x86_64.whl |
| 1.3.1 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.3.1.cpu/tensorflow-1.3.1-cp36-cp36m-linux_x86_64.whl |
| 1.3.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.3.1-gpu/tensorflow-1.3.1-cp27-cp27mu-linux_x86_64.whl |
| 1.3.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.3.1-gpu/tensorflow-1.3.1-cp35cp35m-linux_x86_64.whl |
| 1.3.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.3.1.gpu/tensorflow-1.3.1-cp36-cp36m-linux_x86_64.whl |
| 1.4 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.4-cpu/tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl |
| 1.4 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.4-cpu/tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl |
| 1.4 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.4-cpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl |
| 1.4 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.4-gpu/tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl |
| 1.4 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.4-gpu/tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl |
| 1.4 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.4-gpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl |
| 1.4.1 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.4.1-cpu/tensorflow-1.4.1-cp27-cp27mu-linux_x86_64.whl |
| 1.4.1 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.4.1-cpu/tensorflow-1.4.1-cp35m-linux_x86_64.whl |
| 1.4.1 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.4.1-cpu/tensorflow-1.4.1-cp36-cp36m-linux_x86_64.whl |
| 1.4.1 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.4.1-gpu/tensorflow-1.4.1-cp27-cp27mu-linux_x86_64.whl |
| 1.4.1 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.4.1-gpu/tensorflow-1.4.1-cp35m-linux_x86_64.whl |
| 1.4.1 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.4.1-gpu/tensorflow-1.4.1-cp36-cp36m-linux_x86_64.whl |
| 1.5 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.5-cpu/tensorflow-1.5.0-cp27-cp27mu-linux_x86_64.whl |
| 1.5 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.5-cpu/tensorflow-1.5.0-cp35cp35m-linux_x86_64.whl |
| 1.5 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.5-cpu/tensorflow-1.5.0-cp36-cp36m-linux_x86_64.whl |
| 1.5 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.5-gpu/tensorflow-1.5.0-cp27-cp27mu-linux_x86_64.whl |
| 1.5 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.5-gpu/tensorflow-1.5.0-cp35-cp35m-linux_x86_64.whl |
| 1.5 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.5-gpu/tensorflow-1.5.0-cp36-cp36m-linux_x86_64.whl |
| 1.6 | 2.7 | CPU | https://github.com/mind/wheels/releases/download/tf1.6-cpu/tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl |
| 1.6 | 3.5 | CPU | https://github.com/mind/wheels/releases/download/tf1.6-cpu/tensorflow-1.6.0-cp35-cp35m-linux_x86_64.whl |
| 1.6 | 3.6 | CPU | https://github.com/mind/wheels/releases/download/tf1.6-cpu/tensorflow-1.6.0-cp36-cp36m-linux_x86_64.whl |
| 1.6 | 2.7 | GPU | https://github.com/mind/wheels/releases/download/tf1.6-gpu-cuda91/tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl |
| 1.6 | 3.5 | GPU | https://github.com/mind/wheels/releases/download/tf1.6-gpu-cuda91/tensorflow-1.6.0-cp35-cp35m-linux_x86_64.whl |
| 1.6 | 3.6 | GPU | https://github.com/mind/wheels/releases/download/tf1.6-gpu-cuda91/tensorflow-1.6.0-cp36-cp36m-linux_x86_64.whl |
このセクションには、セットアップをデバッグするためのヒントが含まれています。しかし、真剣に、Tinymindを試してみてください。もう一度デバッグ時間を無駄にする必要はありません。また、自分のマシンで使用できるDocker画像もあります。このセクションが問題を解決しない場合は、必ず問題を提出してください。
異なるTensorflowバージョンは、異なるCUDAバージョンをサポート/要求します。
| TF | cuda | cudnn | 計算機能 |
|---|---|---|---|
| 1.1、1.2 | 8.0 | 5.1 | 3.7(K80) |
| 1.2.1-1.3.1 | 8.0 | 6.0 | 3.7 |
| 1.4 | 8.0/9.0 | 6.0/7.0 | 3.7、6.0(P100)、7.0(V100) |
| 1.4.1 | 8.0/9.0/9.1 | 6.0/7.0 | 3.7、6.0、7.0 |
| 1.5 | 9.0/9.1 | 7.0 | 3.7、6.0、7.0 |
| 1.6 | 9.1 | 7.0 | 3.7、6.0、7.0 |
| 1.7 | 9.0/9.1 | 7.0/7.1 | 3.7、6.0、7.0 |
Tensorflow <1.4は、現在のバージョンであるCuda 9では機能しません。 sudo apt-get install cudaの代わりに、 sudo apt-get install cuda-8-0実行する必要があります。 Cuda 8 Tensorflow 1.4のバリアント1.4 Cudnn 6.0を使用し、Cuda 9.xバリアントはCudnn 7.xを使用します。
# Install CUDA 8
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda-8-0
# Install CUDA 9
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cudaCUDA関連の環境変数が適切に設定されていることを確認してください。
echo ' export CUDA_HOME=/usr/local/cuda ' >> ~ /.bashrc
echo ' export PATH=$PATH:$CUDA_HOME/bin ' >> ~ /.bashrc
echo ' export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/lib64 ' >> ~ /.bashrc
. ~ /.bashrc正しいcudnnをダウンロードして、次のようにインストールしてください。
# The cuDNN tar file.
tar xzvf cudnn-9.0-linux-x64-v7.0.tgz
sudo cp cuda/lib64/ * /usr/local/cuda/lib64/
sudo cp cuda/include/cudnn.h /usr/local/cuda/include/ libcupti Libraryがありませんか?インストールして、 PATHに追加します。
sudo apt-get install libcupti-dev
echo ' export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH ' >> ~ /.bashrc特定のホイールはTensortをサポートします。 Tensortをインストールするには、最初にnvidiaのWebサイトからダウンロードしてから実行してください。
sudo dpkg -i nv-tensorrt-repo-ubuntu1604-ga-cuda9.0-trt3.0.4-20180208_1-1_amd64.deb
sudo apt-get update
sudo apt-get install tensorrtMKLはIntelの深い学習カーネルライブラリであり、CPUでのニューラルネットのトレーニングをはるかに速くします。持っていない場合は、次のようにインストールしてください。
# If you don't have cmake
sudo apt install cmake
git clone https://github.com/01org/mkl-dnn.git
cd mkl-dnn/scripts && ./prepare_mkl.sh && cd ..
mkdir -p build && cd build && cmake .. && make
sudo make install
echo ' export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ' >> ~ /.bashrcUbuntu 16.04 LTSが意図した環境であることに注意してください。古いOSがある場合は、古いGLIBCバージョンの問題に遭遇する可能性があります。ここでディスカッションをチェックして、それらが役立つかどうかを確認することをお勧めします。
MPIサポートでホイールを使用していますか? sudo apt-get install mpich必ず実行してください。