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

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