title: Keras: Load multiple models and predict in different threads
body: <p>I'm using Keras with tensorflow core. 
  I want to load 2 different models in constructor,
  and then make predictions (on request) in different threads. 
  I tried to load these models within tensorflow graph contexts, but it didn't work. My code:</p>
  
  <pre><code>from keras.models import load_model
  from keras import Sequential
  
  def __init__(self):
      self.graph_A = tf.Graph()
      with self.graph_A.as_default():
          self.model_A: Sequential = load_model('model_A_filename')
  
      self.graph_B = tf.Graph()
      with self.graph_B.as_default():
          self.model_B: Sequential = load_model('model_B_filename')
  
  
  def predict_with_model_A(X):
      with self.graph_A.as_default():
          return self.model_A.predict(X)
  
  
  def predict_with_model_B(X):
      with self.graph_B.as_default():
          return self.model_B.predict(X)
  </code></pre>
  
  <p>When I run the program, model A is loaded successfully. However I receive an error on loading model B:</p>
  
  <pre><code>TypeError: Cannot interpret feed_dict key as Tensor: Tensor     
  Tensor("Placeholder:0", shape=(7626, 210), dtype=float32) is not an element 
  of this graph.
  </code></pre>
  
  <p>Will be happy to hear, how to do it right. Thanks!</p>