Filter löschen
Filter löschen

Inputs and number of neuron

1 Ansicht (letzte 30 Tage)
Pawel Osadnik
Pawel Osadnik am 12 Jun. 2018
Kommentiert: Pawel Osadnik am 20 Jun. 2018
Hello, I am preparing a NN for Road Sing Recognicon and it working but not very well. I would like to ask for some advice. I have 954 images of Road Sign, each images has 140x125 = 17500 piksels and my question is, how much i should to have neuron in my network ?
P=cell2mat(struct2cell(all)); %load my pattern
P=reshape(P,17500,954); %matrix with all inputs
% NETWORK
T=eye(3,954); %NETWORK ANSWER
net=newff(P,T,[954],{'hardlims'},'traingd','learngd','mse'); %954 neurons because it is number of my images ?

Akzeptierte Antwort

Greg Heath
Greg Heath am 12 Jun. 2018
I use the concept
Number of training equations Ntrneq >> Number of unknown weights Nw
For a single layer I-H-O net with I-dimensional inputs, O-dimensional outputs and H hidden nodes,
Ntrneq = Ntrn*O % (Typically, Default Ntrn ~ 0.7*N)
Nw = (I+1)*H + (H+1)*O = O + (I+O+1)*H
Ntrn * O >> O + (I+O+1)*H
When Ntrn is too small and/or H is too large, trainlm is usually replaced by trainbr and/or other "overfitting" mitigations are available.
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 Kommentar
Pawel Osadnik
Pawel Osadnik am 20 Jun. 2018
I have one question, you mean Ntrn ~ 0.7*N it's equal 0.7*Numer of neurons ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by