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 정도만 돌려봐서 다른 게임들도 동작하는지는 아직 확인해보지 못했다.


댓글

이 블로그의 인기 게시물

간단한 cfar 알고리즘에 대해

windows에서 간단하게 크롬캐스트(Chromecast)를 통해 윈도우 화면 미러링 방법

base64 인코딩 디코딩 예제 c 소스

아두이노(arduino) 심박센서 (heart rate sensor) 심박수 측정 example code

python asyncio를 이용한 async socket server client example code