Methods
|
|
__init__
backpropagate
get_error
set_weight
update
|
|
__init__
|
__init__ (
self,
num_nodes,
activation=logistic_function,
)
Initialize the Output Layer.
Arguments:
|
|
backpropagate
|
backpropagate (
self,
outputs,
learning_rate,
momentum,
)
Calculate the backpropagation error at a given node.
This calculates the error term using the formula:
p = (z - t) z (1 - z)
where z is the calculated value for the node, and t is the
real value.
Arguments:
|
|
get_error
|
get_error (
self,
real_value,
node_number,
)
Return the error value at a particular node.
|
|
set_weight
|
set_weight (
self,
this_node,
next_node,
value,
)
Exceptions
|
|
NotImplementedError( "Can't set weights for the output layer" )
|
|
|
update
|
update ( self, previous_layer )
Update the value of output nodes from the previous layers.
Arguments:
|
|