-
Notifications
You must be signed in to change notification settings - Fork 8
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
Weight bias init update #96
Conversation
Also @joemehltretter please update all the documentation with regards to the initializer -> weight_init name change and at the init signatures |
…ecessary spaced for mean default in selu_weight_init_
…ncluding documentation
|
Almost there @joemehltretter! Did you have some tests for these initializations? |
… change in standard deviation for weight tests
with torch.no_grad(): | ||
fan_in, _ = nn.init._calculate_fan_in_and_fan_out(tensor) | ||
std = math.sqrt(1. / fan_in) | ||
return nn.init.normal_(tensor, mean, std) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function seems identical to:
nn.init.kaiming_normal_(mode="fan_in", nonlinearity="linear")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix #85
Created
selu_init_
function to mimic pytorch's method for initializing with a normal distribution based on standard deviation of the number of input features. InDenseUnit
andConvUnit
class when checking if activation is SELU set the initilizer toselu_int_
function and setbias_init
to 0.0.