python - Importing Keras inside of Django causes it to crash -
i've created restful api computer vision app i've made.
it works fine using existing svm , nolearn neural network.
however, i've trained new cnn using keras (theano backend) , whenever import keras inside 1 of py modules, crashes.
import keras
i tried importing views.py file , crashes.
this weird , seems directly related django. running python on machine , doing import keras reveals no issue @ all.
what's going on here?
i came error when call model_load function django web backend. must create session when use tensorflow in websever backend! fix add:
import tensorflow tf
with tf.session():
//my code call keras unit
this may you. https://www.tensorflow.org/versions/r0.11/api_docs/python/client/session_management
Comments
Post a Comment