-
Notifications
You must be signed in to change notification settings - Fork 24
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
Input preprocessing for VGG #5
Comments
Interestingly, in lpips module, they are just normalized to [-1, 1]. |
Hi @borisdayma! For the training code I used the range [-1, 1] because that range has worked better for me in the past. Yeah, for lpips the input is [-1, 1] and then the input is normalized using |
Thanks, this is much clearer. |
Thanks for the feedback! I added the argument: import flaxmodels as fm
vgg16 = fm.VGG16(output='logits', pretrained='imagenet', normalize=False) This way the imagenet weights are used but the images are not normalized internally. |
Hi,
In the README, it is mentioned that input should be between 0 and 1.
In the training code, they seem to be between -1 and 1.
In the torchvision doc, they seem to be loaded between 0 and 1 and then normalized with
Should they be preprocessed as per the torchvision docs?
The text was updated successfully, but these errors were encountered: