広告 TensorFlowをインストールディープラーニング用のライブラリであるTensorFlowをインストールしてみた。 GPUを使わないバージョンの方がインストールは楽 ここでは簡単にGPUを使わないバージョンをpipを使った方法でのインストールに付いて書いてみる。 まず必要なpipなどのパッケージをインストール Python 2.7 # apt-get install python-pip python-dev Python 3 # apt-get install python3-pip python3-dev 後はpipでインストールすればいい Python 2.7 # pip install tensorflow Python 3 # pip3 install tensorflow で適当なテストプログラムなどを実行すると RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa ImportError: numpy.core.multiarray failed to import ImportError: numpy.core.umath failed to import ImportError: numpy.core.umath failed to import 2018-02-13 22:50:21.031602: F tensorflow/python/lib/core/bfloat16.cc:664] Check failed: PyBfloat16_Type.tp_base != nullptr 中止 (コアダンプ) みたいなエラーがでるときがある。これはnumpyのバージョンが合っていないため。 Python 2.7 # pip install numpy Python 3 # pip3 install numpy で直るはず。 continue on: [TensorFlowをインストール (GPU編)]
Category: [AI][TensorFlow] - 23:03:07
広告 |