sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/NN/nntest.m
2016-04-28 15:40:36 -04:00

6 lines
184 B
Matlab

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