class_docstr: Create a criterion that calculates the PSNR loss.
  
  The loss is computed as follows:
  
   .. math::
  
      \text{loss} = -\text{psnr(x, y)}
  
  See :meth:`~kornia.losses.psnr` for details abut PSNR.
  
  Args:
      max_val: The maximum value in the image tensor.
  
  Shape:
      - Image: arbitrary dimensional tensor :math:`(*)`.
      - Target: arbitrary dimensional tensor :math:`(*)` same shape as image.
      - Output: a scalar.
  
  Examples:
      >>> ones = torch.ones(1)
      >>> criterion = PSNRLoss(2.)
      >>> criterion(ones, 1.2 * ones) # 10 * log(4/((1.2-1)**2)) / log(10)
      tensor(-20.0000)
code: def __init__(self, max_val: float) -> None:
      super().__init__()
      self.max_val: float = max_val
  
file_path: kornia/kornia/losses/psnr.py
imports: from __future__ import annotations
  import torch
  from torch import nn
  from kornia import metrics
label_desc: Use image node_id 1 to create a new PSNRLoss object from inherited base classes: nn with example: obj = PSNRLoss(max_val)