Skip to content

Instantly share code, notes, and snippets.

@KobayashiRui
Last active April 1, 2018 08:35
Show Gist options
  • Save KobayashiRui/b16235b4dc5a141d5d1187243238782b to your computer and use it in GitHub Desktop.
Save KobayashiRui/b16235b4dc5a141d5d1187243238782b to your computer and use it in GitHub Desktop.
kerasに関することをメモしていく予定

Keras インストール

cpu版

pip install --upgrade tensorflow
pip install keras

GPU版

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

#cudaバージョンでググッてダウンロードでもオッケー
#ダウンロードする場所はホームディレクトリ
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb
sudo apt-get update
sudo apt-get install cuda

#パスの指定.bashrcに書いたほうがいい!
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}update_8.0.61-1_amd64-deb

#cuda8.0の習性パッチ、これもホームディレクトリ
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8.0.61-1_amd64-deb
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8.0.61-1_amd64-deb

conda install -c conda-forge keras
conda install -c conda-forge tensoorflow-gpu

参考文献

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment