Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No clamp for input after Gaussian data augumentation? #9

Open
xinghua-qu opened this issue May 4, 2022 · 1 comment
Open

No clamp for input after Gaussian data augumentation? #9

xinghua-qu opened this issue May 4, 2022 · 1 comment

Comments

@xinghua-qu
Copy link

xinghua-qu commented May 4, 2022

# augment inputs with noise
inputs = inputs + torch.randn_like(inputs, device='cuda') * noise_sd

Line 109 in train.py.

If there is no torch.clamp() after line 109, it is possible that the input image will exceed its allowed pixel value range (i.e., [0,1])

@vietvo89
Copy link

vietvo89 commented Mar 8, 2024

I have the same question. Why the implementation of this approach does not clip the image within the range [0,1]. Without clarification, I think it is a pitfall. When using torch.clamp(), the results of the paper are incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants