testing a neural network program

I have done a neural network program with matlab. I have trained the program with batch training mode. Now I want to test if the program work well. I know I can not change the weights in testing mode ie. the old weights under training mode in the network must be unchanged. I have trained the network with 26 different patterns simultaneously at every epoch and total 1014 patterns. Therefore, the weights in the network is initiated for 26 patterns. Now I want to test the network with just one patterns. How can I do this without changing the network weights.
Thanks in advance

 Akzeptierte Antwort

Greg Heath
Greg Heath am 4 Jan. 2012

0 Stimmen

[I Ntst] = size(ptst) % Test Input
[O Ntst] = size(ttst) % Target
% Naive constant model
y00tst = repmat(mean(tst,2),1,Ntst);
MSE00tst = mse(ttst-y00tst)
% Neural Net model
ytst = sim(net,ptst);
MSEtst = mse(ttst-ytst)
R2tst = 1- MSEtst/MSE00tst
Hope this helps.
Greg

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-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