class_docstr: Dataset wrapping tensors.
  
  Each sample will be retrieved by indexing tensors along the first dimension.
  
  Args:
      *tensors (Tensor): tensors that have the same size of the first dimension.
class_docstr_tok: ["Dataset","wrapping","tensors",".","Each","sample","will","be","retrieved","by","indexing","tensors","along","the","first","dimension",".","Args",":","*","tensors","(","Tensor",")",":","tensors","that","have","the","same","size","of","the","first","dimension","."]
code: def __init__(self, *tensors: Tensor) -> None:
      assert all(
          tensors[0].size(0) == tensor.size(0) for tensor in tensors
      ), "Size mismatch between tensors"
      self.tensors = tensors
  
imports: import bisect
  import itertools
  import math
  import warnings
  from typing import cast, Dict, Generic, Iterable, List, Optional, Sequence, Tuple, TypeVar, Union
  from torch import default_generator, randperm
  from ...None import Generator, Tensor
label_desc: Use image node_id 1 to create a new TensorDataset object from inherited base classes: Dataset with example: obj = TensorDataset()