return outputs
else:
// This case appears if the input was not a Keras tensor.
return self.call(x, mask)
def add_inbound_node(self, inbound_layers,
node_indices=None, tensor_indices=None):
"""
After Change
outputs = self.inbound_nodes[-1].output_tensors
else:
// This case appears if the input was not a Keras tensor.
outputs = to_list(self.call(x, mask))
// Apply activity regularizer if any:
if hasattr(self, "activity_regularizer") and self.activity_regularizer is not None:
regularization_losses = [self.activity_regularizer(x) for x in outputs]
self.add_loss(regularization_losses, input_tensors)
// If single output tensor: return it,
// else return a list (at least 2 elements).