sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/NN/nntest.m

7 lines
184 B
Mathematica
Raw Normal View History

2016-04-28 21:40:36 +02:00
function [er, bad] = nntest(nn, x, y)
labels = nnpredict(nn, x);
[dummy, expected] = max(y,[],2);
bad = find(labels ~= expected);
er = numel(bad) / size(x, 1);
end