class_docstr: Normality Model for the DFKDE algorithm.
  
  Args:
      backbone (str): Pre-trained model backbone.
      pre_trained (bool, optional): Boolean to check whether to use a pre_trained backbone.
      n_comps (int, optional): Number of PCA components. Defaults to 16.
      pre_processing (str, optional): Preprocess features before passing to KDE.
          Options are between `norm` and `scale`. Defaults to "scale".
      filter_count (int, optional): Number of training points to fit the KDE model. Defaults to 40000.
      threshold_steepness (float, optional): Controls how quickly the value saturates around zero. Defaults to 0.05.
      threshold_offset (float, optional): Offset of the density function from 0. Defaults to 12.0.
docstr: Extract features from the pretrained network.
  
  Args:
      batch (Tensor): Image batch.
  
  Returns:
      Tensor: Tensor containing extracted features.
code: def get_features(self, batch: Tensor) -> Tensor:
      """Extract features from the pretrained network.
  
      Args:
          batch (Tensor): Image batch.
  
      Returns:
          Tensor: Tensor containing extracted features.
      """
      self.feature_extractor.eval()
      layer_outputs = self.feature_extractor(batch)
      for layer in layer_outputs:
          batch_size = len(layer_outputs[layer])
          layer_outputs[layer] = F.adaptive_avg_pool2d(
              input=layer_outputs[layer], output_size=(1, 1)
          )
          layer_outputs[layer] = layer_outputs[layer].view(
              batch_size, -1
          )
      layer_outputs = torch.cat(list(layer_outputs.values())).detach()
      return layer_outputs
  
file_path: anomalib/src/anomalib/models/dfkde/torch_model.py
imports: from __future__ import annotations
  import logging
  import torch
  import torch.nn.functional
  from torch import Tensor, nn
  from anomalib.models.components import FeatureExtractor
  from anomalib.models.components.classification import FeatureScalingMethod, KDEClassifier
label_desc: Use image node_id 2 for calling the DfkdeModel obj's underlying member method code with example usage: obj.get_features(batch) and returns: layer_outputs