class_docstr: Feature Extractor module for Region-based anomaly detection.
docstr: Forward pass of the feature extractor.
  
  Args:
      batch (Tensor): Batch of input images of shape [B, C, H, W]
      rois (Tensor): Tensor of shape [N, 5] describing the regions-of-interest in the batch
  Returns:
      Tensor: Tensor containing a 4096-dimensional feature vector for every RoI location.
code: def forward(self, batch: Tensor, rois: Tensor) -> Tensor:
      """Forward pass of the feature extractor.
  
      Args:
          batch (Tensor): Batch of input images of shape [B, C, H, W]
          rois (Tensor): Tensor of shape [N, 5] describing the regions-of-interest in the batch
      Returns:
          Tensor: Tensor containing a 4096-dimensional feature vector for every RoI location.
      """
  
      # Apply the feature extractor transforms
      transformed_batch = self.transform(batch)
  
      # Scale the RoIs to the effective input size of the feature extractor.
      rois[:, 1:] = scale_boxes(
          rois[:, 1:], batch.shape[-2:], transformed_batch.shape[-2:]
      )
  
      # Forward pass through the backbone
      features = self.features(transformed_batch)
      features = self.roi_align(features, rois)
      features = torch.flatten(features, 1)
      features = self.classifier(features)
      return features
  
file_path: anomalib/src/anomalib/models/rkde/feature_extractor.py
imports: import torch
  from torch import Tensor, nn
  from torchvision.ops import RoIAlign
  from torchvision.transforms import Normalize, Resize
  from anomalib.data.utils.boxes import scale_boxes
label_desc: Use image node_id 2 for calling the FeatureExtractor obj's underlying member method code with example usage: obj.forward(batch, rois) and returns: features