I need to implement a code for Handwritten digits recognition( Using MNIST data set) using Stochastic gradient descent, backpropogation with momentum and using sigmoid activation function.

Hello all, I am given 5000 mnist numbers in the form a text file ( 5000 rows of each digit with 784 values in each row for each digit) and also an MNIST labels text file( with 5000 labels for all the 5000 digits) I have to implement an algorithm for 1 hidden layer neural network with 784 inputs, 100 hidden neurons, 10 outputs(one for each digit) with backpropagation algorithm using momentum and stochastic gradient descent. I have no clue how to start with this. Please help me out with this.

1 个评论

Hello, DL enthusiast
did you ever manage to implement the backpropogation altgorithm? I have a similar problem;
1 input, (vector)
3 hidden layers,
1 output (vector)
Any advice greatly appreciated!
JM

请先登录,再进行评论。

回答(2 个)

It is quite simple to implement but would take some time to understand how to. You need to initialize the weights first using the dimensions of number of neurons in hidden layer x the length of each data set. If you have more than 1 hidden layer in your code, the hidden weights for each hidden layer would be the number of neurons in the next layer and the number of neurons in the previous layer. And finally the output weights have to be the dimension in the same manner.
Hope this helps you to start with the problem.
yes,sir
1 hidden layer neural network with 784 inputs, 100 hidden neurons, 10 outputs(one for each digit) with backpropagation algorithm using momentum and stochastic gradient descent.
TF1 = 'tansig';
TF2 = 'tansig';
TF3 = 'tansig';
bp_net = newff(minmax(data), [784,100,10], {TF1 TF2 TF3}, 'traingdm');

类别

帮助中心File Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by