class_docstr: HyperLSTM with Ortho Init, Layer Norm, Recurrent Dropout, no Memory Loss.
  
  https://arxiv.org/abs/1609.09106
  http://blog.otoro.net/2016/09/28/hyper-networks/
class_docstr_tok: ["HyperLSTM","with","Ortho","Init",",","Layer","Norm",",","Recurrent","Dropout",",","no","Memory","Loss",".","https",":","\/\/arxiv.org\/abs\/1609.09106","http",":","\/\/blog.otoro.net\/2016\/09\/28\/hyper-networks\/"]
code: def __call__(self, x, state, timestep=0, scope=None):
      with tf.variable_scope(scope or type(self).__name__):
          total_h, total_c = tf.split(state, 2, 1)
          h = total_h[:, 0 : self.num_units]
          c = total_c[:, 0 : self.num_units]
          self.hyper_state = tf.concat(
              [
                  total_h[:, self.num_units :],
                  total_c[:, self.num_units :],
              ],
              1,
          )
  
          batch_size = x.get_shape().as_list()[0]
          x_size = x.get_shape().as_list()[1]
          self._input_size = x_size
  
          w_init = None  # uniform
  
          h_init = lstm_ortho_initializer(1.0)
  
          w_xh = tf.get_variable(
              "W_xh", [x_size, 4 * self.num_units], initializer=w_init
          )
          w_hh = tf.get_variable(
              "W_hh",
              [self.num_units, 4 * self.num_units],
              initializer=h_init,
          )
          bias = tf.get_variable(
              "bias",
              [4 * self.num_units],
              initializer=tf.constant_initializer(0.0),
          )
  
          # concatenate the input and hidden states for hyperlstm input
          hyper_input = tf.concat([x, h], 1)
          hyper_output, hyper_new_state = self.hyper_cell(
              hyper_input, self.hyper_state
          )
          self.hyper_output = hyper_output
          self.hyper_state = hyper_new_state
  
          xh = tf.matmul(x, w_xh)
          hh = tf.matmul(h, w_hh)
  
          # split Wxh contributions
          ix, jx, fx, ox = tf.split(xh, 4, 1)
          ix = self.hyper_norm(ix, "hyper_ix", use_bias=False)
          jx = self.hyper_norm(jx, "hyper_jx", use_bias=False)
          fx = self.hyper_norm(fx, "hyper_fx", use_bias=False)
          ox = self.hyper_norm(ox, "hyper_ox", use_bias=False)
  
          # split Whh contributions
          ih, jh, fh, oh = tf.split(hh, 4, 1)
          ih = self.hyper_norm(ih, "hyper_ih", use_bias=True)
          jh = self.hyper_norm(jh, "hyper_jh", use_bias=True)
          fh = self.hyper_norm(fh, "hyper_fh", use_bias=True)
          oh = self.hyper_norm(oh, "hyper_oh", use_bias=True)
  
          # split bias
          ib, jb, fb, ob = tf.split(
              bias, 4, 0
          )  # bias is to be broadcasted.
  
          # i = input_gate, j = new_input, f = forget_gate, o = output_gate
          i = ix + ih + ib
          j = jx + jh + jb
          f = fx + fh + fb
          o = ox + oh + ob
  
          if self.use_layer_norm:
              concat = tf.concat([i, j, f, o], 1)
              concat = layer_norm_all(
                  concat, batch_size, 4, self.num_units, "ln_all"
              )
              i, j, f, o = tf.split(concat, 4, 1)
  
          if self.use_recurrent_dropout:
              g = tf.nn.dropout(tf.tanh(j), self.dropout_keep_prob)
          else:
              g = tf.tanh(j)
  
          new_c = (
              c * tf.sigmoid(f + self.forget_bias) + tf.sigmoid(i) * g
          )
          new_h = tf.tanh(
              layer_norm(new_c, self.num_units, "ln_c")
          ) * tf.sigmoid(o)
  
          hyper_h, hyper_c = tf.split(hyper_new_state, 2, 1)
          new_total_h = tf.concat([new_h, hyper_h], 1)
          new_total_c = tf.concat([new_c, hyper_c], 1)
          new_total_state = tf.concat([new_total_h, new_total_c], 1)
      return new_h, new_total_state
  
imports: import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the HyperLSTMCell obj's underlying member method code with example usage: obj.__call__(x, state, timestep, scope) and returns: new_h,  new_total_state