sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/DBN/dbntrain.m

11 lines
232 B
Mathematica
Raw Normal View History

2016-04-28 21:40:36 +02:00
function dbn = dbntrain(dbn, x, opts)
n = numel(dbn.rbm);
dbn.rbm{1} = rbmtrain(dbn.rbm{1}, x, opts);
for i = 2 : n
x = rbmup(dbn.rbm{i - 1}, x);
dbn.rbm{i} = rbmtrain(dbn.rbm{i}, x, opts);
end
end