I want to compare the processing time of my code with and without gpu. My keras backend is Tensorflow. Therefore, it automatically uses the graphics processor. For comparison, I use the model keras/examples/mnist_mlp.py.
I checked the processing time as below. Then how to disable my GPU? Should it be changed ~/.keras/keras.json?
$ time python mnist_mlp.py
Test loss: 0.109761892007
Test accuracy: 0.9832
python mnist_mlp.py 38.22s user 3.18s system 162% cpu 25.543 total
source
share