sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/CNN/cnntest.m

10 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