Learn tf.contrib.rnn.BasicRNNCell() of TensorFlow

TensorFlow version number: 1.1.0

tf.contrib.rnn.BasicRNNCell ()

__init__(
    num_units,
    input_size=None,
    state_is_tuple=True
)

num_numits refers to how many hidden layer units there are;

activation defaults to the tanh activation function.

__call__(
    inputs,
    state,
    scope=None
)

In the call function, inputs refer to the hidden layer input, and state refers to the hidden layer state of the previous time, so

output = new_state = activation(W * input + U * state + B)

About BasicRNNCell, there is a detailed introduction in the blog https://saicoco.github.io/tensorflow2/ .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325448678&siteId=291194637