-
Notifications
You must be signed in to change notification settings - Fork 672
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
How to understand the MeanShift layer? #94
Comments
Hello. The meanshift layer is a module that adds/subtracts channel-wise mean from the input/output images. It is equivalent to: x[:, 0, :, :] -= red_channel_mean
x[:, 1, :, :] -= green_channel_mean
x[:, 2, :, :] -= blue_channel_mean Since I do not prefer such notations, I inherited the convolutional layer to implement it. If you check the code carefully, you will notice that only Thank you. |
That's cool! Thank you for your explanation. |
I have also meet this problem when training on my own dataset,what is the meaning of the std in code? |
Hi, @thstkdgus35
Thanks for sharing your code. I read your code, but I feel confused about the MeanShift layerEDSR-PyTorch/src/model/common.py. The MeanShift layer defined as follows:
In the edsy.py, you set sign=-1 in the first MeanShift layer to sub the mean, and you set sign=1 in the last layer to add the mean. Is that correct? Can you share me the details this layer such as the meaning of self.weight.data and self.bias.data.
Thank you!
The text was updated successfully, but these errors were encountered: