sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/SAE/saetrain.m

11 lines
308 B
Mathematica
Raw Normal View History

2016-04-28 19:40:36 +00:00
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