Why (input * 2 - 1) in all experiments?
futakw opened this issue · 2 comments
futakw commented
Hi, I assume this is the input normalization of mean=0.5 and std=0.5.
- Is this a common way for transfer learning?
- If you have tried, what happens if there's no normalization?
hendrycks commented
It's convenient for mapping back and forth between [-1,1], and [0,1].
…On Mon, Apr 10, 2023 at 2:17 AM futawaseda ***@***.***> wrote:
https://github.com/hendrycks/pre-training/blob/10cd02a3c21698dfc790a50fe442fddf417ad17b/robustness/adversarial/train_imagenet.py#L127
Hi, I assume this is the input normalization of mean=0.5 and std=0.5.
- Is this a common way for transfer learning?
- If you have tried, what happens if there's no normalization?
—
Reply to this email directly, view it on GitHub
<#7>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZBITU7EQDNSNIUHCZT7EDXAPF3LANCNFSM6AAAAAAWYYZODI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
futakw commented
Thank you for your answer.
Usually, images are mean/std normalized ((x - mean)/std), instead of ((x - 0.5)/0.5) which is yours.
But I assumed that, since mean and std are different for pre-train and target datasets, you simply used 0.5 for mean and std.