credit.ensemble.gaussian_noise#
Functions#
|
Adds Gaussian noise to the first portion of channels in a tensor. |
Module Contents#
- credit.ensemble.gaussian_noise.add_gaussian_noise(x, std=0.1, mean=0.0, N=1)#
Adds Gaussian noise to the first portion of channels in a tensor.
- Parameters:
x (torch.Tensor) – Input tensor of shape (B, C, T, lat, lon).
std (float) – Standard deviation of the Gaussian noise.
mean (float) – Mean of the Gaussian noise.
N (int) – Number of different noisy tensors to return.
- Returns:
Single noisy tensor if N=1, else a list of N noisy tensors.
- Return type:
A list of torch.Tensor