class_docstr: Test class for `LearnedPerceptualImagePatchSimilarity` metric.
class_docstr_tok: ["Test","class","for","`","LearnedPerceptualImagePatchSimilarity","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_lpips(self, net_type, ddp):
      """Test class implementation of metric."""
      self.run_class_metric_test(
          ddp=ddp,
          preds=_inputs.img1,
          target=_inputs.img2,
          metric_class=LearnedPerceptualImagePatchSimilarity,
          reference_metric=partial(_compare_fn, net_type=net_type),
          check_scriptable=False,
          check_state_dict=False,
          metric_args={"net_type": net_type},
      )
  
imports: from functools import partial
  from typing import NamedTuple
  import pytest
  import torch
  from lpips import LPIPS
  from torch import Tensor
  from torchmetrics.functional.image.lpips import learned_perceptual_image_patch_similarity
  from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity
  from torchmetrics.utilities.imports import _LPIPS_AVAILABLE, _TORCHVISION_AVAILABLE
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling the TestLPIPS obj's underlying member method code with example usage: obj.test_lpips(net_type, ddp) without return types