torch.nn.init — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.nn.init.dirac_(tensor, groups=1) [source] Fills the {3, 4, 5}-dimensional input Tensor with the Dirac delta function. Preserves the identity of the inputs in Convolutional layers, where as many input channels are preserved as possible. In case of groups>1, each group of channels preserves identity. Parameters.
Xavier Initialization PyTorch vs MxNet - PyTorch Forums
discuss.pytorch.org › t › xavier-initializationFeb 28, 2020 · I am porting an MxNet paper implementation to PyTorch mx.init.Xavier(rnd_type="uniform", factor_type="avg", magnitude=0.0003) and torch.nn.init.xavier_uniform_(array, gain=0.0003) Should be pretty much the same, right? But the docs and source code show another “definition” of magnitude and gain Even when scaling gain and magnitude correctly, I am still getting different ranges of numbers ...