code: def forward(
      self, img1: Tensor, img2: Tensor
  ) -> Tuple[Tensor, Tensor]:
      if not isinstance(img1, Tensor):
          img1 = F.pil_to_tensor(img1)
      if not isinstance(img2, Tensor):
          img2 = F.pil_to_tensor(img2)
  
      img1 = F.convert_image_dtype(img1, torch.float)
      img2 = F.convert_image_dtype(img2, torch.float)
  
      # map [0, 1] into [-1, 1]
      img1 = F.normalize(
          img1, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]
      )
      img2 = F.normalize(
          img2, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]
      )
  
      img1 = img1.contiguous()
      img2 = img2.contiguous()
  
      return img1, img2
  
imports: from typing import Optional, Tuple
  import torch
  from torch import nn, Tensor
  from .None import functional, InterpolationMode
label_desc: Use image node_id 1 for calling the OpticalFlow obj's underlying member method code with example usage: obj.forward(img1, img2) and returns: img1,  img2