class_docstr: Optical Flow extractor.
  
  Computes the pixel displacement between 2 consecutive frames from a video clip.
docstr: Resize inputs to dimensions required by backbone.
  
  Args:
      first_frame (Tensor): Starting frame of optical flow computation.
      last_frame (Tensor): Last frame of optical flow computation.
  Returns:
      tuple[Tensor, Tensor]: Preprocessed first and last frame.
code: def pre_process(
      self, first_frame: Tensor, last_frame: Tensor
  ) -> tuple[Tensor, Tensor]:
      """Resize inputs to dimensions required by backbone.
  
      Args:
          first_frame (Tensor): Starting frame of optical flow computation.
          last_frame (Tensor): Last frame of optical flow computation.
      Returns:
          tuple[Tensor, Tensor]: Preprocessed first and last frame.
      """
      first_frame = F.resize(
          first_frame, size=[520, 960], antialias=False
      )
      last_frame = F.resize(
          last_frame, size=[520, 960], antialias=False
      )
      return self.transforms(first_frame, last_frame)
  
file_path: anomalib/src/anomalib/models/ai_vad/flow.py
imports: from __future__ import annotations
  import torch
  import torchvision.transforms.functional
  from torch import Tensor, nn
  from torchvision.models.optical_flow import Raft_Large_Weights, raft_large
label_desc: Use image node_id 2 for calling the FlowExtractor obj's underlying member method code with example usage: obj.pre_process(first_frame, last_frame) and returns: self