class_docstr: Discriminative model that predicts the anomaly mask from the original image and its reconstruction.
  
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      base_width (int): Base dimensionality of the layers of the autoencoder.
class_docstr_tok: ["Discriminative","model","that","predicts","the","anomaly","mask","from","the","original","image","and","its","reconstruction",".","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","out_channels","(","int",")",":","Number","of","output","channels",".","base_width","(","int",")",":","Base","dimensionality","of","the","layers","of","the","autoencoder","."]
docstr: Generate the predicted anomaly masks for a batch of input images.
  
  Args:
      batch (Tensor): Batch of inputs consisting of the concatenation of the original images
       and their reconstructions.
  
  Returns:
      Activations of the output layer corresponding to the normal and anomalous class scores on the pixel level.
docstr_tok: ["Generate","the","predicted","anomaly","masks","for","a","batch","of","input","images",".","Args",":","batch","(","Tensor",")",":","Batch","of","inputs","consisting","of","the","concatenation","of","the","original","images","and","their","reconstructions",".","Returns",":","Activations","of","the","output","layer","corresponding","to","the","normal","and","anomalous","class","scores","on","the","pixel","level","."]
code: def forward(self, batch: Tensor) -> Tensor:
      """Generate the predicted anomaly masks for a batch of input images.
  
      Args:
          batch (Tensor): Batch of inputs consisting of the concatenation of the original images
           and their reconstructions.
  
      Returns:
          Activations of the output layer corresponding to the normal and anomalous class scores on the pixel level.
      """
      act1, act2, act3, act4, act5, act6 = self.encoder_segment(batch)
      segmentation = self.decoder_segment(
          act1, act2, act3, act4, act5, act6
      )
      return segmentation
  
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 2 for calling the DiscriminativeSubNetwork obj's underlying member method code with example usage: obj.forward(batch) and returns: segmentation