0

I'm trying to run a simple problem in OpenNN. Most of it works okay, but when I get to TestingAnalysis, using the tutorial code gives me an error message to the effect that number of testing instances is zero. Fair enough, since I didn't actually provide it with the test set. I have a test set available, but looking for exactly how you're supposed to provide it, the tutorial doesn't say, and when I look at the examples, their code looks like:

        TestingAnalysis testing_analysis(&neural_network, &data_set);
        TestingAnalysis::LinearRegressionResults linear_regression_results = testing_analysis.perform_linear_regression_analysis();

... but that seems to be the same code as the tutorial, and literally nowhere in the source file is there any line of code to set the data set to anything other than the original training set. Yet the example seems to run okay without crashing on the testing analysis, though also without visibly doing anything there.

What am I missing?

rwallace
  • 31,405
  • 40
  • 123
  • 242

1 Answers1

1

there is couple of ways to approach this issue, actually good to go one by one here (lastly i had simple errors as well while working with the OpenNN library)

  1. Getting error messages (forcing the display of them)

Testing Analysis Class Documentation - http://www.opennn.net/documentation/reference/class_open_n_n_1_1_testing_analysis.html

When you are trying to perform such analysis, don't forget to set display flag ( void set_display (const bool &) plus additionally void check (void) const, which will check if the pointers are not null, still this is just recheck for your case ) Lastly, please use void save (const std::string &) const or std::string to_string (void) const methods, which will allow you to get some date from this object.

  1. Testing the data input/outputs

As far as this all depends on data, its usually logical error from our side (f.e. for the approximation projects there is no possibility to feed the data set with single instance (one row, just inputs and outputs for them), also i just get huge errors while trying to just initiate data set with instances that are not equal at sizes.)

It would be grateful to see the results in simple form, so the object data can be analysed f. e. Vector< Matrix< double > > calculate_error_data (void) const

  1. GUI Analysis (Neural Designer) https://www.neuraldesigner.com/download

That's the simplest approach, this app is based on the OpenNN, so all of the work can be simulated there much quicker, before we are starting with our code. There is bunch of log and information on every step. (It' usually better to start here, and go to our own code templates when we are more sure what we want to do with NN)

For the better answer please provide additional information like "what is the data set and neural network feed, are the "perform_" methods being launched on raw, uninitialized objects or objects with random data, where in code its being used". OpenNN has it own flow of method calls so it all matters.

Guillotine
  • 93
  • 1
  • 9