class_docstr: Component to perform the perceptual evaluation with TorchVision models.
  Currently, only ResNet50 is supported. The network structure is based on:
  https://pytorch.org/vision/main/models/generated/torchvision.models.resnet50.html
  
  Args:
      net: {``"resnet50"``}
          Specifies the network architecture to use. Defaults to ``"resnet50"``.
      pretrained: whether to load pretrained weights. Defaults to `True`.
      pretrained_path: if `pretrained` is `True`, users can specify a weights file to be loaded
          via using this argument. Defaults to `None`.
      pretrained_state_dict_key: if `pretrained_path` is not `None`, this argument is used to
          extract the expected state dict. Defaults to `None`.
code: def __init__(
      self,
      net: str = "resnet50",
      pretrained: bool = True,
      pretrained_path: str | None = None,
      pretrained_state_dict_key: str | None = None,
  ) -> None:
      super().__init__()
      supported_networks = ["resnet50"]
      if net not in supported_networks:
          raise NotImplementedError(
              f"'net' {net} is not supported, please select a network from {supported_networks}."
          )
  
      if pretrained_path is None:
          network = torchvision.models.resnet50(
              weights=torchvision.models.ResNet50_Weights.DEFAULT
              if pretrained
              else None
          )
      else:
          network = torchvision.models.resnet50(weights=None)
          if pretrained is True:
              state_dict = torch.load(pretrained_path)
              if pretrained_state_dict_key is not None:
                  state_dict = state_dict[pretrained_state_dict_key]
              network.load_state_dict(state_dict)
      self.final_layer = "layer4.2.relu_2"
      self.model = torchvision.models.feature_extraction.create_feature_extractor(
          network, [self.final_layer]
      )
      self.eval()
  
      for param in self.parameters():
          param.requires_grad = False
  
imports: from __future__ import annotations
  import warnings
  import torch
  import torch.nn
  from monai.utils import optional_import
  from monai.utils.enums import StrEnum
label_desc: Use image node_id 1 to create a new TorchvisionModelPerceptualSimilarity object from inherited base classes: nn with example: obj = TorchvisionModelPerceptualSimilarity(net, pretrained, pretrained_path, pretrained_state_dict_key)