Method: CooCoo::ActivationFunctions::ReLU#initial_weights
- Defined in:
- lib/coo-coo/activation_functions.rb
#initial_weights(num_inputs, size) ⇒ Object
154 155 156 |
# File 'lib/coo-coo/activation_functions.rb', line 154 def initial_weights(num_inputs, size) CooCoo::Vector.rand(num_inputs * size) * (2.0 / (num_inputs * size).to_f).sqrt end |