hendrycks/pre-training

Why (input * 2 - 1) in all experiments?

futakw opened this issue · 2 comments

logits = net(adv_bx * 2 - 1)

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?

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.