Created
May 24, 2020 22:14
-
-
Save piEsposito/921394de01ab9e2b8b3b81f50991f58a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def init_weights(self): | |
stdv = 1.0 / math.sqrt(self.hidden_size) | |
for weight in self.parameters(): | |
weight.data.uniform_(-stdv, stdv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment