class_docstr: From DETR source: https://github.com/facebookresearch/detr
  (detr/util/misc.py)
class_docstr_tok: ["From","DETR","source",":","https",":","\/\/github.com\/facebookresearch\/detr","(","detr\/util\/misc.py",")"]
docstr: Transfer to device
docstr_tok: ["Transfer","to","device"]
code: def to_device(self, device: "torch.device"):
      """
      Transfer to device
      """
      cast_tensor = self.tensors.to(device)
      mask = self.mask
      if mask is not None:
          assert mask is not None
          cast_mask = mask.to(device)
      else:
          cast_mask = None
      return NestedTensor(cast_tensor, cast_mask)
  
imports: from typing import List, Optional, Tuple, Union
  import torch
label_desc: Use image node_id 2 for calling the NestedTensor obj's underlying member method code with example usage: obj.to_device(device) and returns: NestedTensor