#include #include #include using namespace std; #include int main(int narg, char *argv[]) { int MaxSamples = 1000; int Ninputs = 2; int Noutputs = 1; const unsigned int num_input = 2; const unsigned int num_output = 1; const unsigned int num_layers = 5; const unsigned int num_neurons_hidden1 = 8; const unsigned int num_neurons_hidden2 = 10; const unsigned int num_neurons_hidden3 = 10; const float desired_error = (const float) 0.0001; const unsigned int max_epochs = 500000; const unsigned int epochs_between_reports = 1000; struct fann *ann = fann_create_standard(num_layers, num_input, num_neurons_hidden1, num_neurons_hidden2, num_neurons_hidden3, num_output); fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC); fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC); fann_train_on_file(ann, "mult.dat", max_epochs, epochs_between_reports, desired_error); fann_save(ann, "mult.net"); fann_destroy(ann); return 0; }