matlabneural-networknntool

Can't get neural network result in MATLAB


I guess my question is very simple, but anyway...

I've created neural network using

net = newff(entry_borders, [20, 10], {'logsig', 'logsig'}, 'traingdx');

where entry_borders is an array 50x2: [(0,1), (0,1), ...]

It must be a network with a hidden layer with 50 entries and 10 outputs, isn't it?

But when I run this:

test_result = sim(net, zeros(50));
disp(test_result);

I get matrix with 10x50 elements in test_result (instead of 10 scalar values) - what's that?? I'm not speaking about the teaching process that's why here's so sily code...


Solution

  • zeros(50) gives you a 50x50 matrix, so it is treated as 50 examples (each of dimension 50), which gives 50 predictions (each of size 10)