public Run ( double input, double output ) : double | ||
input | double | Input vector. |
output | double | Desired output vector. |
return | double |
public double Run( double[] input, double[] output )
{
// zero gradient
ResetGradient( );
// compute the network's output
network.Compute( input );
// calculate network error
double error = CalculateError( output );
// calculate weights updates
CalculateGradient( input );
// update the network
UpdateNetwork( );
// return summary error
return error;
}