class_docstr: DISTS PyTorch Metric.
  
  This torchmetric class implements the metric described in the following
  paper:
  
  Image Quality Assessment: Unifying Structure and Texture Similarity
  Keyan Ding, Kede Ma, Shiqi Wang, Eero P. Simoncelli
  
  It has similar properties to LPIPS, but with a greater emphasis on texture.
  
  Args:
      reduction: str indicating how to reduce over the batch dimension.
          Choose between `'sum'` or `'mean'`.
      kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more
          info.
class_docstr_tok: ["DISTS","PyTorch","Metric",".","This","torchmetric","class","implements","the","metric","described","in","the","following","paper",":","Image","Quality","Assessment",":","Unifying","Structure","and","Texture","Similarity","Keyan","Ding",",","Kede","Ma",",","Shiqi","Wang",",","Eero","P.","Simoncelli","It","has","similar","properties","to","LPIPS",",","but","with","a","greater","emphasis","on","texture",".","Args",":","reduction",":","str","indicating","how","to","reduce","over","the","batch","dimension",".","Choose","between","`","'sum","'","`","or","`","'mean","'","`",".","kwargs",":","Additional","keyword","arguments",",","see",":","ref",":","`","Metric","kwargs","`","for","more","info","."]
code: def __init__(
      self, reduction: Literal["sum", "mean"] = "mean", **kwargs: Any
  ) -> None:
      super().__init__(**kwargs)
  
      self.net = NoTrainDists()
  
      valid_reduction = ("mean", "sum")
      if reduction not in valid_reduction:
          raise ValueError(
              f"Argument `reduction` must be one of {valid_reduction}, "
              f"but got {reduction}"
          )
      self.reduction = reduction
  
      self.add_state(
          "sum_scores", torch.tensor(0.0), dist_reduce_fx="sum"
      )
      self.add_state("total", torch.tensor(0.0), dist_reduce_fx="sum")
  
file_path: NeuralCompression/neuralcompression/metrics/_dists.py
imports: from typing import Any, List
  import torch
  from DISTS_pytorch import DISTS
  from torch import Tensor
  from torchmetrics.metric import Metric
  from typing_extensions import Literal
label_desc: Use image node_id 1 to create a new DeepImageStructureTextureSimilarity object from inherited base classes: Metric with example: obj = DeepImageStructureTextureSimilarity(reduction)