DataModule.convert_to_dataloader
- DataModule.convert_to_dataloader(x: ndarray | torch.Tensor | None = None, y: ndarray | torch.Tensor | None = None, z: ndarray | torch.Tensor | None = None, requires_fitted: bool = True, **kwargs) torch.utils.data.DataLoader [source]
Converts input and output data to a dataloader.
- Parameters:
x (Union[np.ndarray, torch.Tensor]) – The input data.
y (Union[np.ndarray, torch.Tensor]) – The output data.
z (Union[np.ndarray, torch.Tensor]) – The latent representation data. The default is None. This is used if one wants to generate data with the decoder.
requires_fitted (bool) – Whether the transformations must be fitted. The default is True.
**kwargs – Additional keyword arguments to be passed to the dataloader.
- Returns:
DataLoader – The dataloader containing the input and output data.