Module: TensorStream::MathHelper
- Included in:
- Evaluator::RubyEvaluator
- Defined in:
- lib/tensor_stream/evaluator/operation_helpers/math_helper.rb
Overview
varoius utility functions for array processing
Instance Method Summary collapse
-
#sigmoid(val) ⇒ Object
Calculates value of y = 1.0 / ( 1.0 + exp( -x ) ).
Instance Method Details
#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 |