open3d.ml.torch.dataloaders.TorchDataloader#
- class open3d.ml.torch.dataloaders.TorchDataloader(dataset=None, preprocess=None, transform=None, sampler=None, use_cache=True, steps_per_epoch=None, **kwargs)#
This class allows you to load datasets for a PyTorch framework.
Example
This example loads the SemanticKITTI dataset using the Torch dataloader:
import torch from torch.utils.data import Dataset, DataLoader train_split = TorchDataloader(dataset=dataset.get_split(‘training’))
- __init__(dataset=None, preprocess=None, transform=None, sampler=None, use_cache=True, steps_per_epoch=None, **kwargs)#
Initialize.
- Parameters:
dataset – The 3D ML dataset class. You can use the base dataset, sample datasets , or a custom dataset.
preprocess – The model’s pre-process method.
transform – The model’s transform method.
use_cache – Indicates if preprocessed data should be cached.
steps_per_epoch – The number of steps per epoch that indicates the batches of samples to train. If it is None, then the step number will be the number of samples in the data.
- Returns:
The corresponding class.
- Return type:
class