class_docstr: Frechet Inception Distance.
  
  This is a minimalist torchmetrics wrapper for the FID calculation in
  torch-fidelity. Unlike the torchmetrics implementation, intermediate
  features are stored on CPU prior to final metric calculation.
  
  Args:
      feature: An integer that indicates the inceptionv3 feature layer to
          choose. Can be one of the following: 64, 192, 768, 2048.
      kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more
          info.
class_docstr_tok: ["Frechet","Inception","Distance",".","This","is","a","minimalist","torchmetrics","wrapper","for","the","FID","calculation","in","torch-fidelity",".","Unlike","the","torchmetrics","implementation",",","intermediate","features","are","stored","on","CPU","prior","to","final","metric","calculation",".","Args",":","feature",":","An","integer","that","indicates","the","inceptionv3","feature","layer","to","choose",".","Can","be","one","of","the","following",":","64",",","192",",","768",",","2048.","kwargs",":","Additional","keyword","arguments",",","see",":","ref",":","`","Metric","kwargs","`","for","more","info","."]
code: def __init__(
      self, feature: int = 2048, normalize: bool = False, **kwargs: Any
  ) -> None:
      super().__init__(**kwargs)
  
      valid_int_input = [64, 192, 768, 2048]
      if feature not in valid_int_input:
          raise ValueError(
              "Integer input to argument `feature` must be one of "
              f"{valid_int_input}, but got {feature}."
          )
  
      self.inception = NoTrainInceptionV3(
          name="inception-v3-compat", features_list=[str(feature)]
      )
  
      if not isinstance(normalize, bool):
          raise ValueError("Argument `normalize` expected to be a bool")
      self.normalize = normalize
  
      self.add_state("real_features", [], dist_reduce_fx="cat")
      self.add_state("fake_features", [], dist_reduce_fx="cat")
  
file_path: NeuralCompression/neuralcompression/metrics/_fid.py
imports: from typing import Any, List
  import torch
  from torch import Tensor
  from torch.nn import Module
  from torch_fidelity.metric_fid import fid_features_to_statistics, fid_statistics_to_metric
  from torchmetrics.image.fid import NoTrainInceptionV3
  from torchmetrics.metric import Metric
label_desc: Use image node_id 1 to create a new FrechetInceptionDistance object from inherited base classes: Metric with example: obj = FrechetInceptionDistance(feature, normalize)