class_docstr: Dataset as a concatenation of tensor datasets with different number of
  tensors (labeled dataset/ unlabeled dataset). Labels of unlabeled dataset will
  be represented as a tensor of zeros.
  
  Each sample will be retrieved by indexing tensors along the first dimension.
  
  Arguments:
      datasets (List[TensorDataset]): datasets to concat.
class_docstr_tok: ["Dataset","as","a","concatenation","of","tensor","datasets","with","different","number","of","tensors","(","labeled","dataset\/","unlabeled","dataset",")",".","Labels","of","unlabeled","dataset","will","be","represented","as","a","tensor","of","zeros",".","Each","sample","will","be","retrieved","by","indexing","tensors","along","the","first","dimension",".","Arguments",":","datasets","(","List","[","TensorDataset","]",")",":","datasets","to","concat","."]
code: def __init__(self, datasets: List[torch.utils.data.TensorDataset]):
      max_ds_len = max([len(ds.tensors) for ds in datasets])
      tensors = ()
      # match tensors count
      for ds in datasets:
          if len(ds.tensors) < max_ds_len:  # no labels
              ds.tensors += (
                  torch.tensor(
                      torch.zeros(ds.tensors[0].shape), dtype=int
                  ),
              )
      # concat
      for i in range(max_ds_len):
          tensors += (
              torch.cat([ds.tensors[i] for ds in datasets], dim=0),
          )
      assert all(
          tensors[0].size(0) == tensor.size(0) for tensor in tensors
      )
      self.tensors = tensors
  
file_path: nlp-architect/nlp_architect/nn/torch/data/dataset.py
imports: import torch
  from typing import List
label_desc: Use image node_id 1 to create a new CombinedTensorDataset object from inherited base classes: torch.utils.data with example: obj = CombinedTensorDataset(datasets)