title: ValueError at /image/ Tensor Tensor("activation_5/Softmax:0", shape=(?, 4), dtype=float32) is not an element of this graph
body: <p>I am building an image processing classifier and this code is an API to predict the image class of the image the whole code is running except this line (pred = model.predict_classes(test_image)) this API is made in Django framework and am using python 2.7</p>
  
  <p>here is a point if I am running this code like normally ( without making an API) it's running perfectly</p>
  
  <pre><code>def classify_image(request):
  if request.method == 'POST' and request.FILES['test_image']:
  
      fs = FileSystemStorage()
      fs.save(request.FILES['test_image'].name, request.FILES['test_image'])
  
  
      test_image = cv2.imread('media/'+request.FILES['test_image'].name)
  
      if test_image is not None:
          test_image = cv2.resize(test_image, (128, 128))
          test_image = np.array(test_image)
          test_image = test_image.astype('float32')
          test_image /= 255
          print(test_image.shape)
      else:
          print('image didnt load')
  
      test_image = np.expand_dims(test_image, axis=0)
      print(test_image)
      print(test_image.shape)
  
      pred = model.predict_classes(test_image)
      print(pred)
  
  return JsonResponse(pred, safe=False)
  </code></pre>