def reset_parameters(self):
init.kaiming_uniform_(self.weight, a=math.sqrt(5))
if self.bias is not None:
fan_in, _ = init._calculate_fan_in_and_fan_out(self.weight)
bound = 1 / math.sqrt(fan_in)
init.uniform_(self.bias, -bound, bound)
I am not sure if someone else has asked the question, may I know why is the bias in Conv2d is not initialized as 0 but initialized using uniform_(-bound, bound)
. Can someone share the knowledge on it? Thanks!