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

Custom Weight Initialization Effect #7

Closed
glenn-jocher opened this issue Apr 10, 2020 · 1 comment
Closed

Custom Weight Initialization Effect #7

glenn-jocher opened this issue Apr 10, 2020 · 1 comment

Comments

@glenn-jocher
Copy link

I noticed you use code for custom weight initialization:

def _initialize_weights(self):
for m in self.modules():
if isinstance(m, nn.Conv2d):
nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
elif isinstance(m, nn.BatchNorm2d):
m.weight.data.fill_(1)
m.bias.data.zero_()

I've not seen this before anywhere. Is there a reason behind this specific strategy? Do you know the effect this has on the training, and have you compared this with the pytorch default weight initialization? Thank you!

@d-li14
Copy link
Owner

d-li14 commented Apr 20, 2020

The same as iamhankai/ghostnet.pytorch#24

@d-li14 d-li14 closed this as completed Apr 20, 2020
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