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

10 lines
308 B
Matlab

function sae = saetrain(sae, x, opts)
for i = 1 : numel(sae.ae);
disp(['Training AE ' num2str(i) '/' num2str(numel(sae.ae))]);
sae.ae{i} = nntrain(sae.ae{i}, x, x, opts);
t = nnff(sae.ae{i}, x, x);
x = t.a{2};
%remove bias term
x = x(:,2:end);
end
end