DataModule.unnormalize_x
- DataModule.unnormalize_x(x: torch.Tensor | ndarray) torch.Tensor | ndarray [source]
Unnormalize only the input data. Takes care of the case where x is a numpy array or a torch tensor.
- Parameters:
x (Union[torch.Tensor, np.ndarray]) – A numpy array or a torch tensor to be unnormalized.
- Returns:
Union[torch.Tensor, np.ndarray] – The unnormalized data. The output has the same type as the input.