class_docstr: Spatial GRU layer.
  
  :param units: Number of SpatialGRU units.
  :param activation: Activation function to use. Default:
      hyperbolic tangent (`tanh`). If you pass `None`, no
      activation is applied (ie. "linear" activation: `a(x) = x`).
  :param recurrent_activation: Activation function to use for
      the recurrent step. Default: sigmoid (`sigmoid`).
      If you pass `None`, no activation is applied (ie. "linear"
      activation: `a(x) = x`).
  :param kernel_initializer: Initializer for the `kernel` weights
      matrix, used for the linear transformation of the inputs.
  :param recurrent_initializer: Initializer for the `recurrent_kernel`
      weights matrix, used for the linear transformation of the
      recurrent state.
  :param direction: Scanning direction. `lt` (i.e., left top)
      indicates the scanning from left top to right bottom, and
      `rb` (i.e., right bottom) indicates the scanning from
      right bottom to left top.
  :param kwargs: Standard layer keyword arguments.
  
  Examples:
      >>> import matchzoo as mz
      >>> layer = mz.contrib.layers.SpatialGRU(units=10,
      ...                                      direction='lt')
      >>> num_batch, channel, left_len, right_len = 5, 5, 3, 2
      >>> layer.build([num_batch, channel, left_len, right_len])
class_docstr_tok: ["Spatial","GRU","layer",".",":","param","units",":","Number","of","SpatialGRU","units",".",":","param","activation",":","Activation","function","to","use",".","Default",":","hyperbolic","tangent","(","`","tanh","`",")",".","If","you","pass","`","None","`",",","no","activation","is","applied","(","ie",".","``","linear","''","activation",":","`","a","(","x",")","=","x","`",")",".",":","param","recurrent_activation",":","Activation","function","to","use","for","the","recurrent","step",".","Default",":","sigmoid","(","`","sigmoid","`",")",".","If","you","pass","`","None","`",",","no","activation","is","applied","(","ie",".","``","linear","''","activation",":","`","a","(","x",")","=","x","`",")",".",":","param","kernel_initializer",":","Initializer","for","the","`","kernel","`","weights","matrix",",","used","for","the","linear","transformation","of","the","inputs",".",":","param","recurrent_initializer",":","Initializer","for","the","`","recurrent_kernel","`","weights","matrix",",","used","for","the","linear","transformation","of","the","recurrent","state",".",":","param","direction",":","Scanning","direction",".","`","lt","`","(","i.e.",",","left","top",")","indicates","the","scanning","from","left","top","to","right","bottom",",","and","`","rb","`","(","i.e.",",","right","bottom",")","indicates","the","scanning","from","right","bottom","to","left","top",".",":","param","kwargs",":","Standard","layer","keyword","arguments",".","Examples",":",">",">",">","import","matchzoo","as","mz",">",">",">","layer","=","mz.contrib.layers.SpatialGRU","(","units=10",",","...","direction='lt","'",")",">",">",">","num_batch",",","channel",",","left_len",",","right_len","=","5",",","5",",","3",",","2",">",">",">","layer.build","(","[","num_batch",",","channel",",","left_len",",","right_len","]",")"]
code: def _time_distributed_dense(cls, w, x, b):
      x = K.dot(x, w)
      x = K.bias_add(x, b)
      return x
  
file_path: MatchZoo/matchzoo/contrib/layers/spatial_gru.py
imports: import typing
  import tensorflow
  from keras import backend
  from keras.engine import Layer
  from keras.layers import Permute
  from keras.layers import Reshape
  from keras import activations
  from keras import initializers
label_desc: Use image node_id 7 for calling the SpatialGRU obj's underlying member method code with example usage: obj._time_distributed_dense(cls, w, x, b) and returns: x