class_docstr: Convolution Module wrapping `lax.conv_general_dilated[_local]`.
  
  Attributes:
    features: number of convolution filters.
    kernel_size: shape of the convolutional kernel. For 1D convolution,
      the kernel size can be passed as an integer, which will be interpreted
      as a tuple of the single integer. For all other cases, it must be a
      sequence of integers.
    strides: an integer or a sequence of `n` integers, representing the
      inter-window strides (default: 1).
    padding: either the string `'SAME'`, the string `'VALID'`, the string
      `'CIRCULAR'` (periodic boundary conditions), or a sequence of `n` `(low,
      high)` integer pairs that give the padding to apply before and after each
      spatial dimension. A single int is interpeted as applying the same padding
      in all dims and passign a single int in a sequence causes the same padding
      to be used on both sides. `'CAUSAL'` padding for a 1D convolution will
      left-pad the convolution axis, resulting in same-sized output.
    input_dilation: an integer or a sequence of `n` integers, giving the
      dilation factor to apply in each spatial dimension of `inputs`
      (default: 1). Convolution with input dilation `d` is equivalent to
      transposed convolution with stride `d`.
    kernel_dilation: an integer or a sequence of `n` integers, giving the
      dilation factor to apply in each spatial dimension of the convolution
      kernel (default: 1). Convolution with kernel dilation
      is also known as 'atrous convolution'.
    feature_group_count: integer, default 1. If specified divides the input
      features into groups.
    use_bias: whether to add a bias to the output (default: True).
    mask: Optional mask for the weights during masked convolution. The mask must
          be the same shape as the convolution weight matrix.
    dtype: the dtype of the computation (default: infer from input and params).
    param_dtype: the dtype passed to parameter initializers (default: float32).
    precision: numerical precision of the computation see `jax.lax.Precision`
      for details.
    kernel_init: initializer for the convolutional kernel.
    bias_init: initializer for the bias.
code: def __init__(
      self,
      in_features: int,
      out_features: int,
      kernel_size: int | tp.Sequence[int],
      strides: tp.Union[None, int, tp.Sequence[int]] = 1,
      *,
      padding: PaddingLike = "SAME",
      input_dilation: tp.Union[None, int, tp.Sequence[int]] = 1,
      kernel_dilation: tp.Union[None, int, tp.Sequence[int]] = 1,
      feature_group_count: int = 1,
      use_bias: bool = True,
      mask_fn: tp.Optional[tp.Callable[[Array], Array]] = None,
      dtype: tp.Optional[Dtype] = None,
      param_dtype: Dtype = jnp.float32,
      precision: PrecisionLike = None,
      kernel_init: tp.Callable[
          [KeyArray, Shape, Dtype], Array
      ] = default_kernel_init,
      bias_init: tp.Callable[
          [KeyArray, Shape, Dtype], Array
      ] = initializers.zeros_init(),
      conv_general_dilated: ConvGeneralDilatedT = lax.conv_general_dilated,
      rngs: rnglib.Rngs,
  ):
      if isinstance(kernel_size, int):
          kernel_size = (kernel_size,)
      else:
          kernel_size = tuple(kernel_size)
  
      kernel_shape = kernel_size + (
          in_features // feature_group_count,
          out_features,
      )
      kernel_key = rngs.params()
      self.kernel = nnx.Param(
          kernel_init(kernel_key, kernel_shape, param_dtype)
      )
  
      if use_bias:
          bias_shape = (out_features,)
          bias_key = rngs.params()
          self.bias = nnx.Param(
              bias_init(bias_key, bias_shape, param_dtype)
          )
      else:
          self.bias = nnx.Param(None)
  
      self.in_features = in_features
      self.out_features = out_features
      self.kernel_size = kernel_size
      self.strides = strides
      self.padding = padding
      self.input_dilation = input_dilation
      self.kernel_dilation = kernel_dilation
      self.feature_group_count = feature_group_count
      self.use_bias = use_bias
      self.mask_fn = mask_fn
      self.dtype = dtype
      self.param_dtype = param_dtype
      self.precision = precision
      self.kernel_init = kernel_init
      self.bias_init = bias_init
      self.conv_general_dilated = conv_general_dilated
  
imports: from __future__ import annotations
  import typing
  from types import MappingProxyType
  import jax
  import jax.numpy
  import numpy
  from jax import lax
  from flax.experimental import nnx
  from flax.experimental.nnx.nnx import rnglib, variables
  from flax.experimental.nnx.nnx.module import Module
  from flax.experimental.nnx.nnx.nn import dtypes, initializers
label_desc: Use image node_id 1 to create a new Conv object from inherited base classes: Module with example: obj = Conv(in_features, out_features, kernel_size, strides)