Defining forward propagation

Define the update gate as given in equation (5):

zt = tf.sigmoid(tf.matmul(x_t, Uz) + tf.matmul(h_t, Wz) + bz)

Define the reset gate as given in equation (6):

rt = tf.sigmoid(tf.matmul(x_t, Ur) + tf.matmul(h_t, Wr) + br)

Define the content state as given in equation (7):

ct = tf.tanh(tf.matmul(x_t, Uc) + tf.matmul(tf.multiply(rt, h_t), Wc) + bc)

Define the hidden state as given in equation (8):

 h_t = tf.multiply((1 - zt), ct) + tf.multiply(zt, h_t)

Compute the output as given in equation (9):

 y_hat_t = tf.matmul(h_t, V) + by
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset