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.

19 ビュー (過去 30 日間)
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 件のコメント
Jme McQ
Jme McQ 2021 年 11 月 29 日
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 件)

Sushi2526
Sushi2526 2017 年 3 月 31 日
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.

yanqi liu
yanqi liu 2021 年 12 月 2 日
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');

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by