def reset_weights(self):
for m in self.modules():<EOL><INDENT>if isinstance(m, nn.Conv2d):<EOL><INDENT>init.orthogonal_(m.weight, gain=np.sqrt(<NUM_LIT:2>))<EOL>init.constant_(m.bias, <NUM_LIT:0.0>)<EOL><DEDENT>elif isinstance(m, nn.Linear):<EOL><INDENT>init.orthogonal_(m.weight, gain=np.sqrt(<NUM_LIT:2>))<EOL>init.constant_(m.bias, <NUM_LIT:0.0>)<EOL><DEDENT>elif isinstance(m, NoisyLinear):<EOL><INDENT>m.reset_weights()<EOL><DEDENT><DEDENT>
Call proper initializers for the weights