I'm implementing my own neural network (with the term implementing i mean writing the code that run the neural network itself, not training).

I implemented it for didactical purpose, but i does not know how to proceede for a validation of what i have done.

So i would ask if there is some best practice for neural network test (eg : is there a dataset of neural nets with weight, input and expected output)

  • 1
    $\begingroup$ You can try your neural net on MNIST for sure... Also you can verify your gradient calculation $\endgroup$ – Aditya Oct 7 '18 at 17:54
  • $\begingroup$ @Aditya : sorry i have not understand your comment. Isn't MINST a dataset ? At the moment i have only the raw implementation of a network nothing more. I would like to test it before proceede with the code writing, and discover at the end of develop process that my implementation have flaw in the activation function (for example) $\endgroup$ – Skary Oct 7 '18 at 18:10
  • $\begingroup$ Please note that I've edited my answer, to add a link to this discussion which is highly pertinent, and frankly better than my existing answer. $\endgroup$ – shadowtalker Oct 11 '18 at 10:24
  1. Make your code testable. You should be able to write plenty of tests for individual components without having to mock up an entire training pipeline for each one. A "property-based testing" library like Hypothesis can be helpful for this.

  2. Train a standard model on a standard dataset and make sure the accuracy numbers are similar.

  3. See here for an in-depth discussion, with more and better advice than I've been able to provide.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.