class SHAInet::Neuron

Defined in:

shainet/basic/neuron.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(n_type : String, id : String = UUID.random.to_s) #

[View source]

Instance Method Detail

def activate(activation_function : ActivationFunction = SHAInet.sigmoid) : Float64 #

This is the forward propogation Allows the neuron to absorb the activation from its' own input neurons through the synapses Then, it sums the information and an activation function is applied to normalize the data


[View source]
def activation : Float64 #

[View source]
def activation=(activation : Float64) #

[View source]
def bias : Float64 #

[View source]
def bias=(bias : Float64) #

[View source]
def clone #

[View source]
def gradient : Float64 #

[View source]
def gradient=(gradient : Float64) #

[View source]
def gradient_batch : Float64 #

[View source]
def gradient_batch=(gradient_batch : Float64) #

[View source]
def gradient_sum : Float64 #

[View source]
def gradient_sum=(gradient_sum : Float64) #

[View source]
def hidden_error_prop : Float64 #

This is the backward propogation of the hidden layers Allows the neuron to absorb the error from its' own target neurons through the synapses Then, it sums the information and a derivative of the activation function is applied to normalize the data


[View source]
def id : String #

[View source]
def id=(id : String) #

[View source]
def input_sum : Float64 #

[View source]
def input_sum=(input_sum : Float64) #

[View source]
def inspect #
Description copied from class Object

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.


[View source]
def m_current : Float64 #

[View source]
def m_current=(m_current : Float64) #

[View source]
def m_prev : Float64 #

[View source]
def m_prev=(m_prev : Float64) #

[View source]
def n_type : String #

[View source]
def n_type=(n_type : String) #

[View source]
def prev_bias : Float64 #

[View source]
def prev_bias=(prev_bias : Float64) #

[View source]
def prev_delta : Float64 #

[View source]
def prev_delta=(prev_delta : Float64) #

[View source]
def prev_delta_b : Float64 #

[View source]
def prev_delta_b=(prev_delta_b : Float64) #

[View source]
def prev_gradient : Float64 #

[View source]
def prev_gradient=(prev_gradient : Float64) #

[View source]
def randomize_bias #

[View source]
def sigma_prime : Float64 #

[View source]
def sigma_prime=(sigma_prime : Float64) #

[View source]
def synapses_in : Array(SHAInet::Synapse) #

[View source]
def synapses_in=(synapses_in : Array(SHAInet::Synapse)) #

[View source]
def synapses_out : Array(SHAInet::Synapse) #

[View source]
def synapses_out=(synapses_out : Array(SHAInet::Synapse)) #

[View source]
def update_bias(value : Float64) #

[View source]
def v_current : Float64 #

[View source]
def v_current=(v_current : Float64) #

[View source]
def v_prev : Float64 #

[View source]
def v_prev=(v_prev : Float64) #

[View source]