Search code examples
pythonamazon-web-servicestheanokeras

Error - Keras+Theano - loss function


I am trying to run a Keras script on an AWS instance. While the script runs fine on my own computer (Python 2.7 - no CPU) it causes an error on AWS. I have installed the latest version of Theano - and other scripts (e.g. the mnist tutoral) do not give errors. The script that is causing the issue is a standard Keras tutoral script (https://github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py). The error is copied in per below (apologies - there might be a better way to capture errors straight from the command line). Any help much appreciated

First page of error message: first page of the error message

End of error message (i have not copied in the entire stack of keras/layers errors)

enter image description here


Solution

  • Somehow you're passing a symbolic value for the border_mode parameter. If this works fine on CPU but not on GPU then, for some reason, the CPU version of the code supports symbolic border modes but the GPU version does not.

    If you can, change the border_mode parameter value to be a Python literal instead of a Theano symbolic variable.