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

About image normalization #30

Closed
YudeWang opened this issue May 22, 2020 · 1 comment
Closed

About image normalization #30

YudeWang opened this issue May 22, 2020 · 1 comment

Comments

@YudeWang
Copy link

Thanks for your work! But I have a tiny question for image normalization.

out_img_y *= 255.0

The output of model is in range [0,1], but I didn't find the normalization for input and target during training, which are loaded from file in range [0, 255]. Then there will be some trouble for the loss between model output and the target. Can you help me to figure out where is the normalization for the input and target to change the range from [0, 255] into [0,1]?

@leftthomas
Copy link
Owner

leftthomas commented May 23, 2020

@YudeWang

image = Variable(ToTensor()(y)).view(1, -1, y.size[1], y.size[0])

You need learn PyTorch better

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