code: def __init__(
      self,
      inplanes: int,
      planes: int,
      stride: int = 1,
      downsample: Optional[nn.Module] = None,
      groups: int = 1,
      base_width: int = 64,
      dilation: int = 1,
      norm_layer: Optional[Callable[..., nn.Module]] = None,
  ) -> None:
      super().__init__()
      if norm_layer is None:
          norm_layer = nn.BatchNorm2d
      if groups != 1 or base_width != 64:
          raise ValueError(
              "BasicBlock only supports groups=1 and base_width=64"
          )
      if dilation > 1:
          raise NotImplementedError(
              "Dilation > 1 not supported in BasicBlock"
          )
      # Both self.conv1 and self.downsample layers downsample the input when stride != 1
      self.conv1 = conv3x3(inplanes, planes, stride)
      self.bn1 = norm_layer(planes)
      self.relu = nn.ReLU(inplace=True)
      self.conv2 = conv3x3(planes, planes)
      self.bn2 = norm_layer(planes)
      self.downsample = downsample
      self.stride = stride
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional, Type, Union
  import torch
  import torch.nn
  from torch import Tensor
  from torch.hub import load_state_dict_from_url
  from flash.core.registry import FlashRegistry
  from flash.core.utilities.imports import _TIMM_AVAILABLE
  from flash.core.utilities.url_error import catch_url_error
label_desc: Use image node_id 1 to create a new BasicBlock object from inherited base classes: nn with example: obj = BasicBlock(inplanes, planes, stride, downsample, groups, base_width, dilation, norm_layer)