Package Bio :: Package NeuralNetwork :: Package BackPropagation :: Module Layer :: Class InputLayer
[hide private]
[frames] | no frames]

Class InputLayer

source code

   object --+    
            |    
AbstractLayer --+
                |
               InputLayer

Instance Methods [hide private]
 
__init__(self, num_nodes, next_layer)
Initialize the input layer.
source code
 
update(self, inputs)
Update the values of the nodes using given inputs.
source code
 
backpropagate(self, outputs, learning_rate, momentum)
Recalculate all weights based on the last round of prediction.
source code

Inherited from AbstractLayer: __str__, set_weight

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, num_nodes, next_layer)
(Constructor)

source code 
Initialize the input layer.

Arguments:

o num_nodes -- The number of nodes in the input layer.

o next_layer -- The next layer in the neural network this is
connected to.

Overrides: object.__init__

update(self, inputs)

source code 
Update the values of the nodes using given inputs.

Arguments:

o inputs -- A list of inputs into the network -- this must be
equal to the number of nodes in the layer.

backpropagate(self, outputs, learning_rate, momentum)

source code 
Recalculate all weights based on the last round of prediction.

Arguments:

o learning_rate -- The learning rate of the network

o momentum - The amount of weight to place on the previous weight
change.

o outputs - The output info we are using to calculate error.