class_docstr: GRU class.
class_docstr_tok: ["GRU","class","."]
docstr: Build the GRU cell.
docstr_tok: ["Build","the","GRU","cell","."]
code: def build(self, x, h, mask=None):
      """
      Build the GRU cell.
      """
      xw = tf.split(tf.matmul(x, self.w_matrix) + self.bias, 3, 1)
      hu = tf.split(tf.matmul(h, self.U), 3, 1)
      r = tf.sigmoid(xw[0] + hu[0])
      z = tf.sigmoid(xw[1] + hu[1])
      h1 = tf.tanh(xw[2] + r * hu[2])
      next_h = h1 * (1 - z) + h * z
      if mask is not None:
          next_h = next_h * mask + h * (1 - mask)
      return next_h
  
file_path: nni/examples/trials/weight_sharing/ga_squad/rnn.py
imports: import tensorflow
  from tensorflow.python.ops.rnn_cell_impl import RNNCell
label_desc: Use image node_id 3 for calling the GRU obj's underlying member method code with example usage: obj.build(x, h, mask) and returns: next_h