class_docstr: Discriminator.
  
      Made of only one encoder layer which takes x and x_hat to produce a score.
  
  Args:
      input_size (tuple[int, int]): Input image size.
      num_input_channels (int): Number of image channels.
      n_features (int): Number of feature maps in each convolution layer.
      extra_layers (int, optional): Add extra intermediate layers. Defaults to 0.
class_docstr_tok: ["Discriminator",".","Made","of","only","one","encoder","layer","which","takes","x","and","x_hat","to","produce","a","score",".","Args",":","input_size","(","tuple","[","int",",","int","]",")",":","Input","image","size",".","num_input_channels","(","int",")",":","Number","of","image","channels",".","n_features","(","int",")",":","Number","of","feature","maps","in","each","convolution","layer",".","extra_layers","(","int",",","optional",")",":","Add","extra","intermediate","layers",".","Defaults","to","0","."]
docstr: Return class of object and features.
docstr_tok: ["Return","class","of","object","and","features","."]
code: def forward(self, input_tensor: Tensor) -> tuple[Tensor, Tensor]:
      """Return class of object and features."""
      features = self.features(input_tensor)
      classifier = self.classifier(features)
      classifier = classifier.view(-1, 1).squeeze(1)
      return classifier, features
  
imports: from __future__ import annotations
  import math
  import torch
  from torch import Tensor, nn
  from anomalib.data.utils.image import pad_nextpow2
label_desc: Use image node_id 2 for calling the Discriminator obj's underlying member method code with example usage: obj.forward(input_tensor) and returns: classifier,  features