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.
  Sets:
      self.data:
          x -- Features [B, C, N]
          pos -- Features [B, 3, N]
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",".","Sets",":","self.data",":","x","--","Features","[","B",",","C",",","N","]","pos","--","Features","[","B",",","3",",","N","]"]
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.
      Sets:
          self.data:
              x -- Features [B, C, N]
              pos -- Features [B, 3, N]
      """
      data = data.to(device)
      if data.x is not None:
          data.x = data.x.transpose(1, 2).contiguous()
      self.input = data
      if data.y is not None:
          self.labels = torch.flatten(data.y).long()  # [B,N]
      else:
          self.labels = data.y
      self.batch_idx = (
          torch.arange(0, data.pos.shape[0])
          .view(-1, 1)
          .repeat(1, data.pos.shape[1])
          .view(-1)
      )
      if self._use_category:
          self.category = data.category
  
file_path: torch-points3d/torch_points3d/models/segmentation/rsconv.py
imports: import logging
  import copy
  import queue
  import torch
  import torch.nn.functional
  from torch_points3d.datasets.segmentation import IGNORE_LABEL
  from torch_points3d.models.base_architectures import UnwrappedUnetBasedModel
  from torch_points3d.modules.RSConv import *
  from torch_points3d.core.common_modules.dense_modules import Conv1D
  from torch_points3d.core.common_modules.base_modules import Seq
  from .base import Segmentation_MP
label_desc: Use image node_id 2 for calling the RSConvLogicModel obj's underlying member method code with example usage: obj.set_input(data, device) without return types