// Return tensor including _keras_shape and _keras_history.
// Note that in this case train_output and test_output are the same pointer.
outputs = input_layer._inbound_nodes[0].output_tensors
if len(outputs) == 1:
return outputs[0]
else:
return outputs
After Change
// Return tensor including _keras_shape and _keras_history.
// Note that in this case train_output and test_output are the same pointer.
outputs = input_layer._inbound_nodes[0].output_tensors
return unpack_singleton(outputs)