Module: Neuronet::Tao
- Defined in:
- lib/neuronet.rb
Overview
A Perceptron Hybrid, Tao directly connects the output layer to the input layer.
Class Method Summary collapse
-
.bless(myself) ⇒ Object
Tao.bless connects the network’s output layer to the input layer, extends it with Tao, and modifies the learning constant if needed.
Instance Method Summary collapse
-
#mu ⇒ Object
Tao’s extra connections adds to mu.
Class Method Details
.bless(myself) ⇒ Object
Tao.bless connects the network’s output layer to the input layer, extends it with Tao, and modifies the learning constant if needed.
472 473 474 475 476 477 478 479 480 481 |
# File 'lib/neuronet.rb', line 472 def self.bless(myself) # @out directly connects to @in myself.out.connect(myself.in) myself.extend Tao # Save current learning and set it to muk(1). l, m = myself.learning, myself.muk # If learning was lower b/4, revert. myself.learning = l if l<m return myself end |
Instance Method Details
#mu ⇒ Object
Tao’s extra connections adds to mu.
465 466 467 468 469 |
# File 'lib/neuronet.rb', line 465 def mu sum = super sum += self.first.length * self.last.length return sum end |