code: def init(
      self,
      input_size,
      output_size,
      channels_last=False,
      mode="linear",
      dtype=torch.float,
  ):
      input_image = torch.randint(
          0,
          256,
          size=input_size,
          dtype=dtype,
          device="cpu",
          requires_grad=self.auto_set(),
      )
      if channels_last:
          if input_image.ndim == 4:
              input_image = input_image.contiguous(
                  memory_format=torch.channels_last
              )
          elif input_image.ndim == 5:
              input_image = input_image.contiguous(
                  memory_format=torch.channels_last_3d
              )
          else:
              raise ValueError(
                  f"Can not set channels_last to the input of {input_image.ndim} dims"
              )
  
      align_corners = None if mode == "nearest" else False
  
      if mode == "linear":
          mode = {
              3: "linear",
              4: "bilinear",
              5: "trilinear",
          }[input_image.ndim]
  
      self.inputs = {
          "input_image": input_image,
          "output_size": output_size,
          "mode": mode,
          "align_corners": align_corners,
      }
  
      self.set_module_name("interpolate")
  
imports: import torch
  import operator_benchmark
label_desc: Use image node_id 1 for calling the InterpolateBenchmark obj's underlying member method code with example usage: obj.init(input_size, output_size, channels_last, mode, dtype) without return types