Fully-connected RNN where the output is to be fed back to input.
This is an RNN layer consisting of one SimpleRNNCell. However, unlike
the underlying SimpleRNNCell, the apply method of SimpleRNN operates
on a sequence of inputs. The shape of the input (not including the first,
batch dimension) needs to be at least 2-D, with the first dimension being
time steps. For example:
// Create an input with 10 time steps. constinput = tf.input({shape: [10, 20]}); constoutput = rnn.apply(input);
console.log(JSON.stringify(output.shape)); // [null, 10, 8]: 1st dimension is unknown batch size; 2nd dimension is the // same as the sequence length of `input`, due to `returnSequences`: `true`; // 3rd dimension is the `SimpleRNNCell`'s number of units.
Fully-connected RNN where the output is to be fed back to input.
This is an
RNN
layer consisting of oneSimpleRNNCell
. However, unlike the underlyingSimpleRNNCell
, theapply
method ofSimpleRNN
operates on a sequence of inputs. The shape of the input (not including the first, batch dimension) needs to be at least 2-D, with the first dimension being time steps. For example: