class_docstr: Base class for perceptual loss model.
class_docstr_tok: ["Base","class","for","perceptual","loss","model","."]
docstr: Instantiates perceptual loss.
  
  Args:
    feature_weight: The weight coefficients of multiple model extracted
      features used for calculating the perceptual loss.
    loss_weight: The weight coefficients between `style_loss` and
      `content_loss`.
docstr_tok: ["Instantiates","perceptual","loss",".","Args",":","feature_weight",":","The","weight","coefficients","of","multiple","model","extracted","features","used","for","calculating","the","perceptual","loss",".","loss_weight",":","The","weight","coefficients","between","`","style_loss","`","and","`","content_loss","`","."]
code: def __init__(
      self,
      feature_weight: Optional[Sequence[float]] = None,
      loss_weight: Optional[PerceptualLossWeight] = None,
  ):
      """Instantiates perceptual loss.
  
      Args:
        feature_weight: The weight coefficients of multiple model extracted
          features used for calculating the perceptual loss.
        loss_weight: The weight coefficients between `style_loss` and
          `content_loss`.
      """
      super().__init__()
      self._loss_op = lambda x, y: tf.math.reduce_mean(tf.abs(x - y))
      self._loss_style = tf.constant(0.0)
      self._loss_content = tf.constant(0.0)
      self._feature_weight = feature_weight
      self._loss_weight = loss_weight
  
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 1 to create a new PerceptualLoss object from inherited base classes: tf.keras with example: obj = PerceptualLoss(feature_weight, loss_weight)