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

10 lines
232 B
Matlab

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