if initial_state is None:
return super(Recurrent, self).__call__(inputs, **kwargs)
if not isinstance(initial_state, (list, tuple)):
initial_state = [initial_state]
is_keras_tensor = hasattr(initial_state[0], "_keras_history")
for tensor in initial_state:
if hasattr(tensor, "_keras_history") != is_keras_tensor:
raise ValueError("The initial state of an RNN layer cannot be"
After Change
if initial_state is None:
return super(Recurrent, self).__call__(inputs, **kwargs)
initial_state = to_list(initial_state, allow_tuple=True)
is_keras_tensor = hasattr(initial_state[0], "_keras_history")
for tensor in initial_state:
if hasattr(tensor, "_keras_history") != is_keras_tensor: