code: def __init__(
      self,
      ssim_weight: float = 0.85,
      ssim_window_size: int = 11,
      ssim_max_val: float = 1.0,
      ssim_sigma: float = 1.5,
      ssim_eps: float = 1e-12,
      ssim_use_padding: bool = True,
      max_displacement_ratio: float = 0.15,
  ) -> None:
      super().__init__()
  
      self._ssim_loss = SSIM(
          kernel_size=ssim_window_size,
          max_val=ssim_max_val,
          sigma=ssim_sigma,
          eps=ssim_eps,
          use_padding=ssim_use_padding,
      )
  
      self._L1_weight = 1 - ssim_weight
      self._SSIM_weight = ssim_weight
      self._max_displacement_ratio = max_displacement_ratio
  
imports: from typing import List, Optional
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  from torchvision.prototype.models.depth.stereo.raft_stereo import grid_sample, make_coords_grid
label_desc: Use image node_id 1 to create a new FlowPhotoMetricLoss object from inherited base classes: nn with example: obj = FlowPhotoMetricLoss(ssim_weight, ssim_window_size, ssim_max_val, ssim_sigma, ssim_eps, ssim_use_padding, max_displacement_ratio)