kaiming_uniform_¶
- dragon.vm.torch.nn.init.- kaiming_uniform_(
 tensor,
 a=0,
 mode='fan_in',
 nonlinearity='leaky_relu'
 )[source]¶
- Fill tensor from a kaiming uniform distribution. \[\text{tensor} \sim \mathcal{U}(-\alpha, \alpha) \\ \, \\ \, \text{where} \quad \alpha = \text{gain} \times \sqrt{\frac{3}{\text{fan}}} \]- Parameters:
- tensor (dragon.vm.torch.Tensor) – The input tensor.
- a (number, optional, default=0) – The negative slope to compute gain value.
- mode ({'fan_in', 'fan_out'}, optional) – The mode to compute fans.
- nonlinearity (str, optional, default='leaky_relu') – The nonlinearity to compute gain value.
 
 - Returns:
- dragon.vm.torch.Tensor – The output tensor. 
 
