错误提示:Cannot interpret feed_dict key as Tensor: The name 'save_1/Const:0' refers to a Tensor which does not exist. The operation, 'save_1/Const', does not exist in the graph.
改之前:
def predict(request):
from mySystem import CNN_Model as CNN
model = CNN.model
path_to_model = ".\mySystem\CNN_on_Cifar10_Model.tfl"
model.load(path_to_model)
改之后(将model设为全局变量):
model = CNN.model
path_to_model = ".\mySystem\CNN_on_Cifar10_Model.tfl"
model.load(path_to_model)
def predict(request):
global model