• 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:

    const rnn = tf.layers.simpleRNN({units: 8, returnSequences: true});

    // Create an input with 10 time steps.
    const input = tf.input({shape: [10, 20]});
    const output = 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.

    Parameters

    • args: SimpleRNNLayerArgs

    Returns SimpleRNN

    Doc

Generated using TypeDoc