code: def __init__(
      self,
      *,
      batch_size: int,
      in_channels: int,
      input_shape: Tuple[int, ...],
      out_channels: int,
      kernel_size: Union[int, Tuple[int, ...]],
      stride: Union[int, Tuple[int, ...]] = 1,
      padding: Union[str, int, Tuple[int, ...]] = 0,
      dilation: Union[int, Tuple[int, ...]] = 1,
      groups: int = 1,
      bias: bool = True,
      padding_mode: str = "zeros",
      random_seed: Optional[int] = None,
      criterion: Callable = F.cross_entropy,
  ) -> None:
      super().__init__(random_seed=random_seed, criterion=criterion)
  
      D = len(input_shape)
      if D == 1:
          self._module_name = nn.Conv1d
      elif D == 2:
          self._module_name = nn.Conv2d
      elif D == 3:
          self._module_name = nn.Conv3d
      else:
          raise Exception("Input shape must be between 1 and 3 long")
  
      self._input_tensor = torch.randn(
          batch_size, in_channels, *input_shape
      )
      self._module = self._module_name(
          in_channels=in_channels,
          out_channels=out_channels,
          kernel_size=kernel_size,
          stride=stride,
          padding=padding,
          dilation=dilation,
          groups=groups,
          bias=bias,
          padding_mode=padding_mode,
      )
      outputs = self._module(self._input_tensor)
      self._labels = torch.randn(outputs.shape)
      del outputs
  
imports: from enum import Enum
  from typing import Callable, Dict, Optional, Tuple, Type, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from opacus.grad_sample import GradSampleModule
  from opacus.grad_sample.utils import wrap_model
  from opacus.layers import DPGRU, DPLSTM, DPRNN, DPMultiheadAttention
  from opacus.layers.dp_rnn import DPRNNBase
label_desc: Use image node_id 1 to create a new ConvBase object from inherited base classes: Layer with example: obj = ConvBase()