check_dataset#
- deepinv.datasets.check_dataset(dataset, allow_non_tensor=True)[source]#
Check that a torch dataset is compatible with DeepInverse.
For details of what is compatible, see
ImageDataset
.- Parameters:
dataset (torch.utils.data.Dataset) – torch dataset.
allow_non_tensor (bool) – allow image types that are not tensors (i.e. numpy ndarrays and PIL Images). Default
False
, which is recommended so that the dataset is asserted to return tensors to be compatible with deepinv.