code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      kernel_size: int = 3,
      stride: int = 1,
      groups: int = 1,
      activation: Optional[str] = "relu",
  ):
      super().__init__()
      self.convolution = nn.Conv2d(
          in_channels,
          out_channels,
          kernel_size=kernel_size,
          stride=stride,
          padding=kernel_size // 2,
          groups=groups,
          bias=False,
      )
      self.normalization = nn.BatchNorm2d(out_channels)
      self.activation = (
          ACT2FN[activation]
          if activation is not None
          else nn.Identity()
      )
  
imports: from typing import Optional
  import torch
  import torch.utils.checkpoint
  from torch import Tensor, nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
  from ...modeling_outputs import BaseModelOutputWithNoAttention, BaseModelOutputWithPoolingAndNoAttention, ImageClassifierOutputWithNoAttention
  from ...modeling_utils import PreTrainedModel
  from ...utils import logging
  from .configuration_regnet import RegNetConfig
label_desc: Use image node_id 1 to create a new RegNetConvLayer object from inherited base classes: nn with example: obj = RegNetConvLayer(in_channels, out_channels, kernel_size, stride, groups, activation)