9 lines
193 B
Matlab
9 lines
193 B
Matlab
function [er, bad] = cnntest(net, x, y)
|
|
% feedforward
|
|
net = cnnff(net, x);
|
|
[~, h] = max(net.o);
|
|
[~, a] = max(y);
|
|
bad = find(h ~= a);
|
|
|
|
er = numel(bad) / size(y, 2);
|
|
end
|