ValueError: Tensor:(…) is not an element of this graph
问题 I am using keras' pre-trained model and the error came up when trying to get predictions. I have the following code in flask server: from NeuralNetwork import * @app.route("/uploadMultipleImages", methods=["POST"]) def uploadMultipleImages(): uploaded_files = request.files.getlist("file[]") getPredictionfunction = preTrainedModel["VGG16"] for file in uploaded_files: path = os.path.join(STATIC_PATH, file.filename) result = getPredictionfunction(path) This is what I have in my NeuralNetwork.py