cc: @fmassa
Hi,
Does this mean adding a gaussian noise to the image, like x + torch.randn_like(x)?
yep sort of like this !! @fmassa
Let me think a bit more about this, as this can be achieved in a one-liner with LambdaTransform.
Yeah this can be done using lambda transforms, like
i = torch.zeros(bs,channels, dim1, dim2).data.normal_(mean, std)
But to make things more easy for users , i thought it is good to add this as a part of primitive transforms.
@fmassa what's your take should we do this ?
t = T.Compose([T.Lambda(lambda x : x + torch.randn_like(x))])
this works as expected. I think its safe to close this for now and later revisit if requested. Right?
I believe that randn_like generates a uniform distribution... Not a Guassian distribution...
@dlmacedo randn_like is supposed to generate a gaussian distribution, as it calls randn. If that's not the case, it's a bug in PyTorch
Most helpful comment
Yeah this can be done using lambda transforms, like
i = torch.zeros(bs,channels, dim1, dim2).data.normal_(mean, std)But to make things more easy for users , i thought it is good to add this as a part of primitive transforms.