TensorFlow版本號:1.1.0python
tf.contrib.rnn.BasicRNNCell()git
__init__( num_units, input_size=None, state_is_tuple=True )
num_numits指代了有多少個隱藏層單元;github
activation默認爲tanh激活函數。bash
__call__( inputs, state, scope=None )
call函數中,inputs指代隱藏層輸入,state指代上一個時間的隱藏層狀態,因此函數
output = new_state = activation(W * input + U * state + B)
關於BasicRNNCell,在博客https://saicoco.github.io/tensorflow2/中有詳細的介紹。code