Method: TensorStream::MathHelper#sigmoid
- Defined in:
- lib/tensor_stream/evaluator/operation_helpers/math_helper.rb
#sigmoid(val) ⇒ Object
Calculates value of y = 1.0 / ( 1.0 + exp( -x ) )
5 6 7 |
# File 'lib/tensor_stream/evaluator/operation_helpers/math_helper.rb', line 5 def sigmoid(val) 1 / (1 + Math.exp(-val)) end |