class_docstr: Cell class for the ConvLSTM2D layer.
  
  Args:
    filters: Integer, the dimensionality of the output space
      (i.e. the number of output filters in the convolution).
    kernel_size: An integer or tuple/list of n integers, specifying the
      dimensions of the convolution window.
    strides: An integer or tuple/list of n integers,
      specifying the strides of the convolution.
      Specifying any stride value != 1 is incompatible with specifying
      any `dilation_rate` value != 1.
    padding: One of `"valid"` or `"same"` (case-insensitive).
      `"valid"` means no padding. `"same"` results in padding evenly to 
      the left/right or up/down of the input such that output has the same 
      height/width dimension as the input.
    data_format: A string,
      one of `channels_last` (default) or `channels_first`.
      It defaults to the `image_data_format` value found in your
      Keras config file at `~/.keras/keras.json`.
      If you never set it, then it will be "channels_last".
    dilation_rate: An integer or tuple/list of n integers, specifying
      the dilation rate to use for dilated convolution.
      Currently, specifying any `dilation_rate` value != 1 is
      incompatible with specifying any `strides` value != 1.
    activation: Activation function to use.
      If you don't specify anything, no activation is applied
      (ie. "linear" activation: `a(x) = x`).
    recurrent_activation: Activation function to use
      for the recurrent step.
    use_bias: Boolean, whether the layer uses a bias vector.
    kernel_initializer: Initializer for the `kernel` weights matrix,
      used for the linear transformation of the inputs.
    recurrent_initializer: Initializer for the `recurrent_kernel`
      weights matrix,
      used for the linear transformation of the recurrent state.
    bias_initializer: Initializer for the bias vector.
    unit_forget_bias: Boolean.
      If True, add 1 to the bias of the forget gate at initialization.
      Use in combination with `bias_initializer="zeros"`.
      This is recommended in [Jozefowicz et al., 2015](
        http://www.jmlr.org/proceedings/papers/v37/jozefowicz15.pdf)
    kernel_regularizer: Regularizer function applied to
      the `kernel` weights matrix.
    recurrent_regularizer: Regularizer function applied to
      the `recurrent_kernel` weights matrix.
    bias_regularizer: Regularizer function applied to the bias vector.
    kernel_constraint: Constraint function applied to
      the `kernel` weights matrix.
    recurrent_constraint: Constraint function applied to
      the `recurrent_kernel` weights matrix.
    bias_constraint: Constraint function applied to the bias vector.
    dropout: Float between 0 and 1.
      Fraction of the units to drop for
      the linear transformation of the inputs.
    recurrent_dropout: Float between 0 and 1.
      Fraction of the units to drop for
      the linear transformation of the recurrent state.
  
  Call arguments:
    inputs: A 4D tensor.
    states:  List of state tensors corresponding to the previous timestep.
    training: Python boolean indicating whether the layer should behave in
      training mode or in inference mode. Only relevant when `dropout` or
      `recurrent_dropout` is used.
class_docstr_tok: ["Cell","class","for","the","ConvLSTM2D","layer",".","Args",":","filters",":","Integer",",","the","dimensionality","of","the","output","space","(","i.e",".","the","number","of","output","filters","in","the","convolution",")",".","kernel_size",":","An","integer","or","tuple\/list","of","n","integers",",","specifying","the","dimensions","of","the","convolution","window",".","strides",":","An","integer","or","tuple\/list","of","n","integers",",","specifying","the","strides","of","the","convolution",".","Specifying","any","stride","value","!","=","1","is","incompatible","with","specifying","any","`","dilation_rate","`","value","!","=","1.","padding",":","One","of","`","``","valid","''","`","or","`","``","same","''","`","(","case-insensitive",")",".","`","``","valid","''","`","means","no","padding",".","`","``","same","''","`","results","in","padding","evenly","to","the","left\/right","or","up\/down","of","the","input","such","that","output","has","the","same","height\/width","dimension","as","the","input",".","data_format",":","A","string",",","one","of","`","channels_last","`","(","default",")","or","`","channels_first","`",".","It","defaults","to","the","`","image_data_format","`","value","found","in","your","Keras","config","file","at","`","~\/.keras\/keras.json","`",".","If","you","never","set","it",",","then","it","will","be","``","channels_last","''",".","dilation_rate",":","An","integer","or","tuple\/list","of","n","integers",",","specifying","the","dilation","rate","to","use","for","dilated","convolution",".","Currently",",","specifying","any","`","dilation_rate","`","value","!","=","1","is","incompatible","with","specifying","any","`","strides","`","value","!","=","1.","activation",":","Activation","function","to","use",".","If","you","do","n't","specify","anything",",","no","activation","is","applied","(","ie",".","``","linear","''","activation",":","`","a","(","x",")","=","x","`",")",".","recurrent_activation",":","Activation","function","to","use","for","the","recurrent","step",".","use_bias",":","Boolean",",","whether","the","layer","uses","a","bias","vector",".","kernel_initializer",":","Initializer","for","the","`","kernel","`","weights","matrix",",","used","for","the","linear","transformation","of","the","inputs",".","recurrent_initializer",":","Initializer","for","the","`","recurrent_kernel","`","weights","matrix",",","used","for","the","linear","transformation","of","the","recurrent","state",".","bias_initializer",":","Initializer","for","the","bias","vector",".","unit_forget_bias",":","Boolean",".","If","True",",","add","1","to","the","bias","of","the","forget","gate","at","initialization",".","Use","in","combination","with","`","bias_initializer=","''","zeros","''","`",".","This","is","recommended","in","[","Jozefowicz","et","al.",",","2015","]","(","http",":","\/\/www.jmlr.org\/proceedings\/papers\/v37\/jozefowicz15.pdf",")","kernel_regularizer",":","Regularizer","function","applied","to","the","`","kernel","`","weights","matrix",".","recurrent_regularizer",":","Regularizer","function","applied","to","the","`","recurrent_kernel","`","weights","matrix",".","bias_regularizer",":","Regularizer","function","applied","to","the","bias","vector",".","kernel_constraint",":","Constraint","function","applied","to","the","`","kernel","`","weights","matrix",".","recurrent_constraint",":","Constraint","function","applied","to","the","`","recurrent_kernel","`","weights","matrix",".","bias_constraint",":","Constraint","function","applied","to","the","bias","vector",".","dropout",":","Float","between","0","and","1",".","Fraction","of","the","units","to","drop","for","the","linear","transformation","of","the","inputs",".","recurrent_dropout",":","Float","between","0","and","1",".","Fraction","of","the","units","to","drop","for","the","linear","transformation","of","the","recurrent","state",".","Call","arguments",":","inputs",":","A","4D","tensor",".","states",":","List","of","state","tensors","corresponding","to","the","previous","timestep",".","training",":","Python","boolean","indicating","whether","the","layer","should","behave","in","training","mode","or","in","inference","mode",".","Only","relevant","when","`","dropout","`","or","`","recurrent_dropout","`","is","used","."]
code: def build(self, input_shape):
      if self.data_format == "channels_first":
          channel_axis = 1
      else:
          channel_axis = -1
      if input_shape[channel_axis] is None:
          raise ValueError(
              "The channel dimension of the inputs "
              "should be defined. Found `None`."
          )
      input_dim = input_shape[channel_axis]
      kernel_shape = self.kernel_size + (input_dim, self.filters * 4)
      self.kernel_shape = kernel_shape
      recurrent_kernel_shape = self.kernel_size + (
          self.filters,
          self.filters * 4,
      )
  
      self.kernel = self.add_weight(
          shape=kernel_shape,
          initializer=self.kernel_initializer,
          name="kernel",
          regularizer=self.kernel_regularizer,
          constraint=self.kernel_constraint,
      )
      self.recurrent_kernel = self.add_weight(
          shape=recurrent_kernel_shape,
          initializer=self.recurrent_initializer,
          name="recurrent_kernel",
          regularizer=self.recurrent_regularizer,
          constraint=self.recurrent_constraint,
      )
  
      if self.use_bias:
          if self.unit_forget_bias:
  
              def bias_initializer(_, *args, **kwargs):
                  return backend.concatenate(
                      [
                          self.bias_initializer(
                              (self.filters,), *args, **kwargs
                          ),
                          initializers.get("ones")(
                              (self.filters,), *args, **kwargs
                          ),
                          self.bias_initializer(
                              (self.filters * 2,), *args, **kwargs
                          ),
                      ]
                  )
  
          else:
              bias_initializer = self.bias_initializer
          self.bias = self.add_weight(
              shape=(self.filters * 4,),
              name="bias",
              initializer=bias_initializer,
              regularizer=self.bias_regularizer,
              constraint=self.bias_constraint,
          )
      else:
          self.bias = None
      self.built = True
  
imports: import numpy
  from tensorflow.python.keras import activations
  from tensorflow.python.keras import backend
  from tensorflow.python.keras import constraints
  from tensorflow.python.keras import initializers
  from tensorflow.python.keras import regularizers
  from tensorflow.python.keras.engine.base_layer import Layer
  from tensorflow.python.keras.engine.input_spec import InputSpec
  from tensorflow.python.keras.layers.recurrent import DropoutRNNCellMixin
  from tensorflow.python.keras.layers.recurrent import RNN
  from tensorflow.python.keras.utils import conv_utils
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.keras.utils import tf_utils
  from tensorflow.python.ops import array_ops
label_desc: Use image node_id 2 for calling the ConvLSTM2DCell obj's underlying member method code with example usage: obj.build(input_shape) and returns: backend