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

Multiply window size by input channels dimension #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StillSpeedo
Copy link

Hi, Mathias!
Please, look at the authors' implementation in PyTorch:
self.slide_winsize = self.weight_maskUpdater.shape[1] * self.weight_maskUpdater.shape[2] * self.weight_maskUpdater.shape[3]
and compare with your current
self.window_size = self.kernel_size[0] * self.kernel_size[1]
According to the paper, the scaling factor for all valid (unmasked) pixels in window is 1, but in your case it is 1/(input channels dimension).
I don't think it's a big problem, this additional multiplier is constant for each layer and can be learned by the network, or even batch norm negates it :)
But if you make proposed changes to the code, old trained weights will be invalid.

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

Successfully merging this pull request may close these issues.

None yet

1 participant