i made a neuron network that recognizes number on screen 28x28 pixels (each pixel can be 1 or 0). there's 784 inputs, 10 neurons in hidden layer and 10 neurons in output layer. every layer uses sigmoid fuction. If first neuron in output layer has the largest number it says that 0 is on the screen, if second neuron is largest - 1 etc. The only thing i can't understand is training. can someone please help?
#Learning AI
6 messages · Page 1 of 1 (latest)
First, you need a dataset of images with corresponding labels. For your case, it seems like you're working with handwritten digits, so a common dataset is MNIST, which consists of 28x28 grayscale images of handwritten digits from 0 to 9.You'll need to preprocess the images. For MNIST, this typically involves scaling the pixel values to a range between 0 and 1, and flattening the 28x28 images into 1D arrays of length 784.
nitialize the weights and biases of your neural network. You can initialize them randomly.
Perform forward propagation to compute the output of the network for a given input. This involves applying the sigmoid function to the weighted sum of inputs at each neuron in each layer.
then Calculate the loss between the predicted output and the actual labels. A common loss function for classification tasks like this is the cross-entropy loss.
This is where the magic happens.
The only thing you csn't understand is ... The entire thing
Try to watch 3Blue1Brown's videos about the backpropagation algorithm
hmm