Class: Neuronet::Node
- Inherits:
-
Object
- Object
- Neuronet::Node
- Defined in:
- lib/neuronet.rb
Overview
A Node, used for the input layer.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#activation ⇒ Object
(also: #update)
readonly
Returns the value of attribute activation.
Instance Method Summary collapse
-
#backpropagate(error) ⇒ Object
Node is a terminal where backpropagation ends.
-
#initialize(val = 0.0) ⇒ Node
constructor
A new instance of Node.
-
#value ⇒ Object
The “real world” value is stored as a squashed activation.
-
#value=(val) ⇒ Object
The “real world” value of a node is the value of it’s activation unsquashed.
Constructor Details
#initialize(val = 0.0) ⇒ Node
Returns a new instance of Node.
34 35 36 |
# File 'lib/neuronet.rb', line 34 def initialize(val=0.0) self.value = val end |
Instance Attribute Details
#activation ⇒ Object (readonly) Also known as: update
Returns the value of attribute activation.
25 26 27 |
# File 'lib/neuronet.rb', line 25 def activation @activation end |
Instance Method Details
#backpropagate(error) ⇒ Object
Node is a terminal where backpropagation ends.
44 45 46 47 |
# File 'lib/neuronet.rb', line 44 def backpropagate(error) # to be over-ridden nil end |