class_docstr: Convert image to :obj:`torch.Tensor` by given keys.
  
  The dimension order of input image is (H, W, C). The pipeline will convert
  it to (C, H, W). If only 2 dimension (H, W) is given, the output would be
  (1, H, W).
  
  Args:
      keys (Sequence[str]): Key of images to be converted to Tensor.
class_docstr_tok: ["Convert","image","to",":","obj",":","`","torch.Tensor","`","by","given","keys",".","The","dimension","order","of","input","image","is","(","H",",","W",",","C",")",".","The","pipeline","will","convert","it","to","(","C",",","H",",","W",")",".","If","only","2","dimension","(","H",",","W",")","is","given",",","the","output","would","be","(","1",",","H",",","W",")",".","Args",":","keys","(","Sequence","[","str","]",")",":","Key","of","images","to","be","converted","to","Tensor","."]
code: def __init__(self, keys):
      self.keys = keys
  
imports: from collections.abc import Sequence
  import mmcv
  import numpy
  import torch
  from mmcv.parallel import DataContainer
  from ..builder import PIPELINES
label_desc: Use image node_id 1 to create a new ImageToTensor object from inherited base classes: object with example: obj = ImageToTensor(keys)