0

I just launched an AWS P2 instance trying to train a model. However it seems to be using the CPU to train not the GPU. How can I force it to train using the GPU not the CPU?

$ nano ~/.keras/keras.json says this
{
    "image_dim_ordering": "th",
    
"epsilon": 1e-07,

    "floatx": "float32",
    
"backend": "tensorflow"
    }

I am getting a message "Failed to load the native TensorFlow runtime."

I then changed

$ nano ~/.keras/keras.json says this
{
    "image_dim_ordering": "th",
    
"epsilon": 1e-07,

    "floatx": "float32",
    
"backend": "theano"
    }

It's training, however very slowly and seems to be using the cpu.

caramelslice
  • 359
  • 1
  • 4
  • 16

1 Answers1

0

It looks like the answer is add a gpus flag!

python cnn_homework_solution.py --gpus 0,1

caramelslice
  • 359
  • 1
  • 4
  • 16