class_docstr: Image perceptual quality loss.
  
  It obtains a weighted loss between the VGGPerceptualLoss and L1 loss.
class_docstr_tok: ["Image","perceptual","quality","loss",".","It","obtains","a","weighted","loss","between","the","VGGPerceptualLoss","and","L1","loss","."]
docstr: Computes image perceptual quality loss.
docstr_tok: ["Computes","image","perceptual","quality","loss","."]
code: def __call__(
      self,
      img1: tf.Tensor,
      img2: tf.Tensor,
  ) -> tf.Tensor:
      """Computes image perceptual quality loss."""
      loss_value = []
      if self._loss_weight is None:
          self._loss_weight = PerceptualLossWeight()
  
      if self._loss_weight.content > 0 or self._loss_weight.style > 0:
          vgg_loss = self._vgg_loss(img1, img2)
          vgg_loss_value = tf.math.add_n(vgg_loss.values())
          loss_value.append(vgg_loss_value)
      if self._loss_weight.l1 > 0:
          l1_loss = self._l1_loss(reduction=self._reduction)(img1, img2)
          l1_loss_value = tf_utils.safe_mean(
              l1_loss * self._loss_weight.l1
          )
          loss_value.append(l1_loss_value)
      total_loss = tf.math.add_n(loss_value)
      return total_loss
  
imports: import abc
  from typing import Mapping, Sequence
  import dataclasses
  from typing import Any, Optional
  import numpy
  import tensorflow
  from mediapipe.model_maker.python.core.utils import file_util
  from mediapipe.model_maker.python.core.utils import model_util
  from official.modeling import tf_utils
label_desc: Use image node_id 3 for calling the ImagePerceptualQualityLoss obj's underlying member method code with example usage: obj.__call__(img1, img2) and returns: total_loss