simple-keras-rest-api
simple-keras-rest-api copied to clipboard
Solves ValueError (using same graph)
Solves: ValueError
problem because of not saving the graph just after loading the pre-trained weights of ResNet50
.
Error:
(at execution of model.predict(image)
)
ValueError: Tensor Tensor("fc1000/Softmax:0", shape=(?, 1000), dtype=float32) is not an element of this graph.
System details: Ubuntu 18.04 Keras Version: 2.1.6 Tensorflow Version: 1.8.0 Python Version: Python 3.6.5
Reference: https://github.com/tensorflow/tensorflow/issues/14356#issuecomment-385962623
Your PR will fail if the user is using a non-TF backend (such as Theano, CNTK, mxnet, etc.). If you're making TF specific checks you'll want to check and see if the user is actually using TF.