zhongyy / SFace

Code of TIP2021 Paper《SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition》. We provide both MxNet and Pytorch versions.
86 stars 11 forks source link

Initialization method of weights #2

Open CloudWalking0 opened 3 years ago

CloudWalking0 commented 3 years ago

Hi, yy, I was wondering why you choose xavier_normal_(self.weight, gain=2, mode='out') instead of nn.init.xavier_uniform_(self.weight) when initializing weights. And by looking through the xaviernormal function, I found the weights won't participate in gradient propagation, why?

Thanks for your sharing, and have a nice day :)