nlp_architect.nn.torch.data package
Submodules
nlp_architect.nn.torch.data.dataset module
-
class
nlp_architect.nn.torch.data.dataset.
CombinedTensorDataset
(datasets: List[torch.utils.data.dataset.TensorDataset])[source] Bases:
torch.utils.data.dataset.Dataset
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.
Parameters: datasets (List[TensorDataset]) – datasets to concat.
-
class
nlp_architect.nn.torch.data.dataset.
ConcatTensorDataset
(dataset: torch.utils.data.dataset.TensorDataset, datasets: List[torch.utils.data.dataset.TensorDataset])[source] Bases:
torch.utils.data.dataset.Dataset
Dataset as a concatenation of multiple TensorDataset datasets with same number of tensors.
Each sample will be retrieved by indexing tensors along the first dimension.
Parameters: - dataset (TensorDataset) – dataset to which rest datasets will be concatinated.
- datasets (List[TensorDataset]) – datasets to concat to the dataset.