docstr: Unpack input data from the dataloader and perform necessary pre-processing steps.
  Parameters:
      input: a dictionary that contains the data itself and its metadata information.
docstr_tok: ["Unpack","input","data","from","the","dataloader","and","perform","necessary","pre-processing","steps",".","Parameters",":","input",":","a","dictionary","that","contains","the","data","itself","and","its","metadata","information","."]
code: def set_input(self, data, device):
      """Unpack input data from the dataloader and perform necessary pre-processing steps.
      Parameters:
          input: a dictionary that contains the data itself and its metadata information.
      """
      data = data.to(device)
  
      if isinstance(data, MultiScaleBatch):
          self.pre_computed = data.multiscale
          self.upsample = data.upsample
          del data.upsample
          del data.multiscale
      else:
          self.upsample = None
          self.pre_computed = None
  
      self.input = data
      self.labels = data.y
      self.batch_idx = data.batch
  
      if self._use_category:
          self.category = data.category
  
imports: from typing import Any
  import logging
  from omegaconf.dictconfig import DictConfig
  from omegaconf.listconfig import ListConfig
  from torch.nn import Sequential, Dropout, Linear
  import torch.nn.functional
  from torch import nn
  from .base import Segmentation_MP
  from torch_points3d.core.common_modules import FastBatchNorm1d
  from torch_points3d.modules.PPNet import *
  from torch_points3d.core.base_conv.partial_dense import *
  from torch_points3d.core.common_modules import MultiHeadClassifier, Identity
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.models.base_architectures.unet import UnwrappedUnetBasedModel
  from torch_points3d.datasets.multiscale_data import MultiScaleBatch
  from torch_points3d.datasets.segmentation import IGNORE_LABEL
label_desc: Use image node_id 2 for calling the PPNet obj's underlying member method code with example usage: obj.set_input(data, device) without return types