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.
469 470 471 472 473 474 475 476 477 478 |
# File 'lib/neuronet.rb', line 469 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.
462 463 464 465 466 |
# File 'lib/neuronet.rb', line 462 def mu sum = super sum += self.first.length * self.last.length return sum end |