class_docstr: Base class for perceptual loss model.
class_docstr_tok: ["Base","class","for","perceptual","loss","model","."]
docstr: Gets weighted multi-scale style loss.
  
  Args:
    x_feats: Reconstructed face image.
    y_feats: Target face image.
  
  Returns:
    A scalar tensor for the style loss.
docstr_tok: ["Gets","weighted","multi-scale","style","loss",".","Args",":","x_feats",":","Reconstructed","face","image",".","y_feats",":","Target","face","image",".","Returns",":","A","scalar","tensor","for","the","style","loss","."]
code: def _get_style_loss(
      self, x_feats: Sequence[tf.Tensor], y_feats: Sequence[tf.Tensor]
  ) -> tf.Tensor:
      """Gets weighted multi-scale style loss.
  
      Args:
        x_feats: Reconstructed face image.
        y_feats: Target face image.
  
      Returns:
        A scalar tensor for the style loss.
      """
      style_losses = []
      i = 0
      for coef, x_feat, y_feat in zip(
          self._feature_weight, x_feats, y_feats
      ):
          x_feat_g = _compute_gram_matrix(x_feat)
          y_feat_g = _compute_gram_matrix(y_feat)
          style_loss = self._loss_op(x_feat_g, y_feat_g) * coef
          style_losses.append(style_loss)
          i = i + 1
  
      return tf.math.reduce_sum(style_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 5 for calling the PerceptualLoss obj's underlying member method code with example usage: obj._get_style_loss(x_feats, y_feats) and returns: tf