class_docstr: Encoder part of the reconstructive network.
  
  Args:
      in_channels (int): Number of input channels.
      base_width (int): Base dimensionality of the layers of the autoencoder.
class_docstr_tok: ["Encoder","part","of","the","reconstructive","network",".","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","base_width","(","int",")",":","Base","dimensionality","of","the","layers","of","the","autoencoder","."]
code: def __init__(
      self, in_channels: int, base_width: int, sspcab: bool = False
  ) -> None:
      super().__init__()
      self.block1 = nn.Sequential(
          nn.Conv2d(in_channels, base_width, kernel_size=3, padding=1),
          nn.BatchNorm2d(base_width),
          nn.ReLU(inplace=True),
          nn.Conv2d(base_width, base_width, kernel_size=3, padding=1),
          nn.BatchNorm2d(base_width),
          nn.ReLU(inplace=True),
      )
      self.mp1 = nn.Sequential(nn.MaxPool2d(2))
      self.block2 = nn.Sequential(
          nn.Conv2d(
              base_width, base_width * 2, kernel_size=3, padding=1
          ),
          nn.BatchNorm2d(base_width * 2),
          nn.ReLU(inplace=True),
          nn.Conv2d(
              base_width * 2, base_width * 2, kernel_size=3, padding=1
          ),
          nn.BatchNorm2d(base_width * 2),
          nn.ReLU(inplace=True),
      )
      self.mp2 = nn.Sequential(nn.MaxPool2d(2))
      self.block3 = nn.Sequential(
          nn.Conv2d(
              base_width * 2, base_width * 4, kernel_size=3, padding=1
          ),
          nn.BatchNorm2d(base_width * 4),
          nn.ReLU(inplace=True),
          nn.Conv2d(
              base_width * 4, base_width * 4, kernel_size=3, padding=1
          ),
          nn.BatchNorm2d(base_width * 4),
          nn.ReLU(inplace=True),
      )
      self.mp3 = nn.Sequential(nn.MaxPool2d(2))
      self.block4 = nn.Sequential(
          nn.Conv2d(
              base_width * 4, base_width * 8, kernel_size=3, padding=1
          ),
          nn.BatchNorm2d(base_width * 8),
          nn.ReLU(inplace=True),
          nn.Conv2d(
              base_width * 8, base_width * 8, kernel_size=3, padding=1
          ),
          nn.BatchNorm2d(base_width * 8),
          nn.ReLU(inplace=True),
      )
      self.mp4 = nn.Sequential(nn.MaxPool2d(2))
      if sspcab:
          self.block5 = SSPCAB(base_width * 8)
      else:
          self.block5 = nn.Sequential(
              nn.Conv2d(
                  base_width * 8,
                  base_width * 8,
                  kernel_size=3,
                  padding=1,
              ),
              nn.BatchNorm2d(base_width * 8),
              nn.ReLU(inplace=True),
              nn.Conv2d(
                  base_width * 8,
                  base_width * 8,
                  kernel_size=3,
                  padding=1,
              ),
              nn.BatchNorm2d(base_width * 8),
              nn.ReLU(inplace=True),
          )
  
imports: from __future__ import annotations
  import torch
  from torch import Tensor, nn
  from anomalib.models.components.layers import SSPCAB
label_desc: Use image node_id 1 to create a new EncoderReconstructive object from inherited base classes: nn with example: obj = EncoderReconstructive(in_channels, base_width, sspcab)