lvapeab / nmt-keras

Neural Machine Translation with Keras
http://nmt-keras.readthedocs.io
MIT License
532 stars 130 forks source link

Theano backend with "USE_TF_OPTIMIZER = True" #68

Closed ptamas88 closed 6 years ago

ptamas88 commented 6 years ago

Hello! I am trying to run NMT-Keras in an nvidia-docker container but it uses Theano backend no matter what I set in USE_TF_OPTIMIZER parameter in the config file. I haven't changed anything yet, just wanna see it running. I installed CUDA 9.0 with CudNN on the host and tensorflow-gpu in the container. If I run

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

i cac see the GPUs. Can you help me what to change for tensorflow gpu usage? Thanks!

lvapeab commented 6 years ago

Hi,

you should set the Keras backend to tensorflow. Edit your $HOME/.keras/keras.json and switch the backend option to tensorflow.

See: https://keras.io/backend/

Cheers

ptamas88 commented 6 years ago

@ @lvapeab Thenak you very much, it's so obvious I forgot it :|