Hi all!!
I'm new with Matlab, and i've got a problem with the parameters of my neural network. In my case, i have 1000 inputs of size 27. My output is a boolean.
– How to choose the number of hidden layers, and the number of neurons in my layers?
– How to choose the training function?
I built a neural network with 6 neurons on each of my 3 hidden layers (at random :p). I launched the training with the 'trainlm' function. But when the training is finished (after 3 iterations??), i've got weird values: mu = 10^100, grad = 10^-31, and my results are around 0.5 (whereas it must be a boolean …)
From where does the problem come ?
Thanks all ^^
PS: here is a part of my code:
hiddenSizes = [6 6 6];trainFcn = 'trainlm';net = feedforwardnet(hiddenSizes,trainFcn);net.trainParam.epochs = 10000;net.trainParam.min_grad = 0;net.trainParam.goal = 0;net.trainParam.mu_max = 10^100;net.trainParam.mu = 0.001;net.trainParam.max_fail = 100;net.layers{:}.transferFcn = 'logsig';net2 = train(net,inputs,targets);outputs = net2(inputs);
Best Answer