I was going through pytorch codebase for face generation using DCGAN and come across this code.
def weights_init(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal_(m.weight.data, 0.0, 0.02)
elif classname.find('BatchNorm') != -1:
nn.init.normal_(m.weight.data, 1.0, 0.02)
nn.init.constant_(m.bias.data, 0)
I don't understand line 2 classname = m.__class__.__name__ and line 3 if classname.find('Conv') != -1: from above method weights_init.
