How to train a neural network?

I know the modules for neural networks, but what confuses me the most is training them.

For my case, I want to train a network to get pixels from a canvas and then get what logic gate the user is trying to draw, I know the basic mechanics of neural networks but on every module I find, there isn’t a straight forward tutorial on how to train them.

So if anyone got an idea on how to train on certain modules, please tell me!

DataPredict Creator here. Maybe I can help you out.

First I want to make note that current neural network modules (including Kironte’s) aren’t really suitable for images since they lack convolutional layers (like you see in Tensorflow and PyTorch). So it may not yield really good result.

Once that is out of a way, we can begin the main part.

Let’s assume we have an image that has one colour with the size of 10 x 10. What you need to do is that you “flatten” those 10 x 10 pixels to 100 features to be inputted to the input neurons.

Assuming you are using my library, DataPredict, if you wish to train multiple images, then you would have a matrix size of m rows and (w * h) columns, where m is the number of images, w and h is the width and height of those images.