tf.keras.backend.rnn

View source on GitHub

Iterates over the time dimension of a tensor.

tf.keras.backend.rnn(
    step_function, inputs, initial_states, go_backwards=False, mask=None,
    constants=None, unroll=False, input_length=None, time_major=False,
    zero_output_for_mask=False
)

Arguments:

Returns:

A tuple, (last_output, outputs, new_states). last_output: the latest output of the rnn, of shape (samples, ...) outputs: tensor with shape (samples, time, ...) where each entry outputs[s, t] is the output of the step function at time t for sample s. new_states: list of tensors, latest states returned by the step function, of shape (samples, ...).

Raises: