ValueError: Tensor Tensor("activation_5/Softmax:0", shape=(?, 2), dtype=float32) is not an element of this graph
The solution to this issue is predict from the keras model when running a tensorflow graph as default. 

import tensorflow as tf
graph = tf.get_default_graph()

global graph
with graph.as_default():
    result = loaded_model.predict(x)