pub fn calculate_gain(non_linearity: &str) -> f32
Expand description
Returns the recommended gain value for the given non-linearity function.
Supported non-linearities are:
- linear
- sigmoid
- tanh
- relu
- leaky_relu
non_linearity
- a non-linearity function’s name.
If non_linearity
is not among those listed above.