anaconda tensorflow-gpu 및 gym 설치
deep-learning 공부를 위해 python과 tensorflow를 설치했었다.
노트북에 nvidia 그래픽 카드가 붙어 있어 gpu버전을 사용하기로 했다.
vram이 2G정도라 이미지를 이용한 학습 등 많은 메모리를 요구하는 작업은 안되지만, 샘플 코드를 돌려보는 데는 cpu버전보다 학습속도가 빠른 편이다.
1. Tensorflow-gpu 설치
Anaconda를 설치하면, tensorflow가 기본으로 설치되어 있다.
gpu버전의 tensorflow를 사용하려면, 아래 명령어를 사용하여 tensorflow 삭제 후
conda remove tensorflow
|
tensorflow-gpu버전을 설치하면 된다.
conda install -c anaconda tensorflow-gpu
|
tensorflow-gpu 설치 할 때 함께 설치된 cudatoolkit 버전에 맞게 NVIDIA 사이트(https://developer.nvidia.com/cuda-toolkit-archive)에서 cuda toolkit을 다운받아 설치 했다.
2. Keras 설치
gpu버전
conda install keras-gpu
|
cpu 버전
conda install keras
|
3. OpenAI gym 설치
Visual c++ toolkit(2015/2017) 설치되어 있지 않을 경우 Visual c++ toolkit 설치 (2015/2017) 설치.
pip install gym
conda install pystan
conda install git
conda install Box2D
pip install
git+https://github.com/Kojoley/atari-py.git
|
Gym은 cartpole 정도만 돌려봐서 다른 게임들도 동작하는지는 아직 확인해보지 못했다.
댓글
댓글 쓰기