Effacer les filtres
Effacer les filtres

Inputs and number of neuron

1 vue (au cours des 30 derniers jours)
Pawel Osadnik
Pawel Osadnik le 12 Juin 2018
Commenté : Pawel Osadnik le 20 Juin 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 ?

Réponse acceptée

Greg Heath
Greg Heath le 12 Juin 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 commentaire
Pawel Osadnik
Pawel Osadnik le 20 Juin 2018
I have one question, you mean Ntrn ~ 0.7*N it's equal 0.7*Numer of neurons ?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by