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

Class HiddenLayer

source code

   object --+    
            |    
AbstractLayer --+
                |
               HiddenLayer

Instance Methods [hide private]
 
__init__(self, num_nodes, next_layer, activation=<function logistic_function at 0x7ff0ae6c8938>)
Initialize a hidden layer.
source code
 
update(self, previous_layer)
Update the values of nodes from the previous layer info.
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, activation=<function logistic_function at 0x7ff0ae6c8938>)
(Constructor)

source code 

Initialize a hidden layer.

Arguments:
  • num_nodes -- The number of nodes in this hidden layer.
  • next_layer -- The next layer in the neural network that this is connected to.
  • activation -- The transformation function used to transform predicted values.
Overrides: object.__init__

update(self, previous_layer)

source code 

Update the values of nodes from the previous layer info.

Arguments:
  • previous_layer -- The previous layer in the network.

backpropagate(self, outputs, learning_rate, momentum)

source code 

Recalculate all weights based on the last round of prediction.

Arguments:
  • learning_rate -- The learning rate of the network
  • momentum - The amount of weight to place on the previous weight change.
  • outputs - The output values we are using to see how good our network is at predicting things.