calculate_gain¶
- dragon.vm.torch.nn.init.- calculate_gain(
 nonlinearity,
 param=None
 )[source]¶
- Return the gain value according to nonlinearity function. - Parameters:
- nonlinearity (str) – The nonlinearity to compute gain value.
- param (number, optional) – The optional param value for nonlinearity.
 
 - Returns:
- number – The gain value. 
 
