반응형

Keras With Theano Backend 설치



Keras를 Theano를 Backend로 해서 설치하는 방법입니다.

아래와 같이 gcc를 설치하고, 이를 파이썬에서 이용할 라이브러리들을 설치한후,

Theano와 Keras를 차례대로 설치하시면 됩니다.


  • Install TDM GCC x64.
  • Install Anaconda x64.
  • Open the Anaconda prompt
  • Run conda update conda
  • Run conda update --all
  • Run conda install mingw libpython
  • Install the latest version of Theano, pip install git+git://github.com/Theano/Theano.git
  • Run pip install git+git://github.com/fchollet/keras.git


이렇게 설치 과정이 복잡한 이유는 Keras뒤에 Theano가 있고 Theano는 또 C++로 구현되어 있기 때문입니다. 

만약 gcc를 설치하지 않고 Keras를 사용하게 되면 Python으로 구현된 Theano를 Backend로 해서 돌아가게되는데

이 경우 속도는 gcc를 설치하지 않았을 때와 비교하여 현저하게 낮습니다.  

따라서 Keras with Theano를 이용할 때는 꼭 gcc를 설치하는 것이 좋습니다.


출처


http://stackoverflow.com/questions/34097988/how-do-i-install-keras-and-theano-in-anaconda-python-2-7-on-windows

반응형
반응형