code: def __call__(self, img: np.ndarray) -> float:
      if self.net not in MODELS:
          MODELS[self.net] = self._LPIPS(net=self.net)
      loss_fn = MODELS[self.net]
      assert img.shape[2] == 3
      assert len(img.shape) == 3
      assert img.max() <= 256.0, f"Image max = {img.max()}"
      assert img.min() >= 0.0
      assert img.max() > 3.0
      img0 = (
          torch.clamp(
              torch.Tensor(img).unsqueeze(0).permute(0, 3, 1, 2)
              / 256.0,
              0,
              1,
          )
          * 2.0
          - 1.0
      )
      img1 = (
          torch.clamp(
              torch.Tensor(self.reference.copy())
              .unsqueeze(0)
              .permute(0, 3, 1, 2)
              / 256.0,
              0,
              1,
          )
          * 2.0
          - 1.0
      )  # The copy operation is here because of a warning otherwise, as Torch does not support non-writable numpy arrays.
      return float(loss_fn(img0, img1))
  
imports: import os
  import typing
  import torch
  import numpy
  import cv2
  from nevergrad.functions.base import UnsupportedExperiment
  from nevergrad.common.decorators import Registry
label_desc: Use image node_id 2 for calling the Lpips obj's underlying member method code with example usage: obj.__call__(img) and returns: float