diff --git a/dataset/dataset.py b/dataset/dataset.py index 6f807d03000d5328897ff4d009413ab6799a6a0a..551d448dbfedd2241e0a116560492ee50a56dffb 100644 --- a/dataset/dataset.py +++ b/dataset/dataset.py @@ -11,7 +11,7 @@ class Threshold_noise: self.threshold = threshold def __call__(self, x): - return torch.max(x-self.threshold,0) + return torch.clamp(x, min=self.threshold) class Log_normalisation: """Log normalisation of intensities"""