class_docstr: Abstract base class for convolutional RNNs
class_docstr_tok: ["Abstract","base","class","for","convolutional","RNNs"]
code: def __init__(
      self,
      input_shape,
      hidden_channels,
      i2h_kernel,
      h2h_kernel,
      i2h_pad,
      i2h_dilate,
      h2h_dilate,
      i2h_weight_initializer,
      h2h_weight_initializer,
      i2h_bias_initializer,
      h2h_bias_initializer,
      dims,
      conv_layout,
      activation,
  ):
      super(_BaseConvRNNCell, self).__init__()
  
      self._hidden_channels = hidden_channels
      self._input_shape = input_shape
      self._conv_layout = conv_layout
      self._activation = activation
  
      # Convolution setting
      assert all(
          isinstance(spec, int) or len(spec) == dims
          for spec in [
              i2h_kernel,
              i2h_pad,
              i2h_dilate,
              h2h_kernel,
              h2h_dilate,
          ]
      ), (
          "For {dims}D convolution, the convolution settings can only be either int "
          "or list/tuple of length {dims}".format(dims=dims)
      )
  
      self._i2h_kernel = (
          (i2h_kernel,) * dims
          if isinstance(i2h_kernel, numeric_types)
          else i2h_kernel
      )
      self._stride = (1,) * dims
      self._i2h_pad = (
          (i2h_pad,) * dims
          if isinstance(i2h_pad, numeric_types)
          else i2h_pad
      )
      self._i2h_dilate = (
          (i2h_dilate,) * dims
          if isinstance(i2h_dilate, numeric_types)
          else i2h_dilate
      )
      self._h2h_kernel = (
          (h2h_kernel,) * dims
          if isinstance(h2h_kernel, numeric_types)
          else h2h_kernel
      )
      assert all(
          k % 2 == 1 for k in self._h2h_kernel
      ), f"Only support odd number, get h2h_kernel= {str(h2h_kernel)}"
      self._h2h_dilate = (
          (h2h_dilate,) * dims
          if isinstance(h2h_dilate, numeric_types)
          else h2h_dilate
      )
  
      (
          self._channel_axis,
          self._in_channels,
          i2h_param_shape,
          h2h_param_shape,
          self._h2h_pad,
          self._state_shape,
      ) = self._decide_shapes()
  
      self.i2h_weight = Parameter(
          "i2h_weight",
          shape=i2h_param_shape,
          init=i2h_weight_initializer,
          allow_deferred_init=True,
      )
      self.h2h_weight = Parameter(
          "h2h_weight",
          shape=h2h_param_shape,
          init=h2h_weight_initializer,
          allow_deferred_init=True,
      )
      self.i2h_bias = Parameter(
          "i2h_bias",
          shape=(hidden_channels * self._num_gates,),
          init=i2h_bias_initializer,
          allow_deferred_init=True,
      )
      self.h2h_bias = Parameter(
          "h2h_bias",
          shape=(hidden_channels * self._num_gates,),
          init=h2h_bias_initializer,
          allow_deferred_init=True,
      )
  
imports: from math import floor
  from ...base import numeric_types
  from .rnn_cell import HybridRecurrentCell
  from ..parameter import Parameter
  from ...None import np, npx
  from ...util import use_np
label_desc: Use image node_id 1 to create a new _BaseConvRNNCell object from inherited base classes: HybridRecurrentCell with example: obj = _BaseConvRNNCell(input_shape, hidden_channels, i2h_kernel, h2h_kernel, i2h_pad, i2h_dilate, h2h_dilate, i2h_weight_initializer, h2h_weight_initializer, i2h_bias_initializer, h2h_bias_initializer, dims, conv_layout, activation)