// which itself will be called upon self.add_inbound_node if necessary.
if not hasattr(self, "_trainable_weights"):
self._trainable_weights = []
if not hasattr(self, "_non_trainable_weights"):
self._non_trainable_weights = []
if not hasattr(self, "losses"):
self.losses = []
After Change
if "batch_input_shape" in kwargs:
batch_input_shape = tuple(kwargs["batch_input_shape"])
elif "input_shape" in kwargs:
if "batch_size" in kwargs:
batch_size = kwargs["batch_size"]
else:
batch_size = None