class_docstr: General N-dimensional convolution.
docstr: **Arguments:**
  
  - `x`: The input. Should be a JAX array of shape
      `(in_channels, dim_1, ..., dim_N)`, where `N = num_spatial_dims`.
  - `key`: Ignored; provided for compatibility with the rest of the Equinox API.
      (Keyword only argument.)
  
  **Returns:**
  
  A JAX array of shape `(out_channels, new_dim_1, ..., new_dim_N)`.
code: def __call__(
      self, x: Array, *, key: Optional[PRNGKeyArray] = None
  ) -> Array:
      """**Arguments:**
  
      - `x`: The input. Should be a JAX array of shape
          `(in_channels, dim_1, ..., dim_N)`, where `N = num_spatial_dims`.
      - `key`: Ignored; provided for compatibility with the rest of the Equinox API.
          (Keyword only argument.)
  
      **Returns:**
  
      A JAX array of shape `(out_channels, new_dim_1, ..., new_dim_N)`.
      """
  
      unbatched_rank = self.num_spatial_dims + 1
      if x.ndim != unbatched_rank:
          raise ValueError(
              f"Input to `Conv` needs to have rank {unbatched_rank},",
              f" but input has shape {x.shape}.",
          )
      x = jnp.expand_dims(x, axis=0)
      x = lax.conv_general_dilated(
          lhs=x,
          rhs=self.weight,
          window_strides=self.stride,
          padding=self.padding,
          rhs_dilation=self.dilation,
          feature_group_count=self.groups,
      )
      x = jnp.squeeze(x, axis=0)
      if self.use_bias:
          x = x + self.bias
      return x
  
imports: import itertools
  import math
  from collections.abc import Callable, Sequence
  from typing import Optional, TypeVar, Union
  import jax
  import jax.lax
  import jax.numpy
  import jax.random
  import numpy
  from jaxtyping import Array, PRNGKeyArray
  from .._module import field, Module
  from ._misc import all_sequences
label_desc: Use image node_id 2 for calling the Conv obj's underlying member method code with example usage: obj.__call__(x) and returns: x