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.

조회 수: 8(최근 30일)
Deep Learning Enthusiast 2017년 3월 30일
답변: yanqi liu 2021년 12월 2일
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 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)
JM

댓글을 달려면 로그인하십시오.

답변(2개)

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.
댓글 수: 0표시숨기기 이전 댓글 수: -1

댓글을 달려면 로그인하십시오.

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');

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!