title: TypeError: Tensor is unhashable if Tensor equality is enabled. Instead, use tensor.experimental_ref() as the key
body: <p>I was trying to apply transfer learning to the InceptionV3. Here is my code:</p>
  <pre><code>inception_model = InceptionV3(weights='imagenet',include_top=False)
  output_inception = inception_model.output
  output_globalavgpooling = GlobalAveragePooling2D()(output_inception)
  output_dense = Dense(1024,activation='relu')(output_globalavgpooling)
  predictions = Dense(1,activation='sigmoid')(output_dense)
  
  final_model = Model(inception_model.input,output=predictions)
  
  final_model.compile()
  
  inception_model.summary()
  </code></pre>
  <p>When I run this code I am getting following error at the <code>final_model = Model(inception_model.input,output=predictions)</code> line:</p>
  <pre><code>TypeError: Tensor is unhashable if Tensor equality is enabled. Instead, use tensor.experimental_ref() as the key.
  </code></pre>
  <p>What should I do?</p>