class_docstr: Structure that holds a list of images (of possibly
  varying sizes) as a single tensor.
  This works by padding the images to the same size,
  and storing in a field the original sizes of each image
class_docstr_tok: ["Structure","that","holds","a","list","of","images","(","of","possibly","varying","sizes",")","as","a","single","tensor",".","This","works","by","padding","the","images","to","the","same","size",",","and","storing","in","a","field","the","original","sizes","of","each","image"]
code: def to(self, device):
      # type: (Device) -> ImageList # noqa
      cast_tensor = self.tensors.to(device)
      return ImageList(cast_tensor, self.image_sizes)
  
imports: from typing import List, Tuple
  from torch import Tensor
label_desc: Use image node_id 2 for calling the ImageList obj's underlying member method code with example usage: obj.to(device) and returns: ImageList