Mercurial > hg > camir-aes2014
annotate reproduce_AES53rd/rerun_figure3/new_rbm.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function [mod] = new_rbm(hidNum,type) |
wolffd@0 | 2 % computes a new RBM that can be used instead of the saved ones |
wolffd@0 | 3 |
wolffd@0 | 4 conf.hidNum = hidNum; |
wolffd@0 | 5 conf.eNum = 150; |
wolffd@0 | 6 conf.bNum = 1; |
wolffd@0 | 7 conf.gNum = 1; |
wolffd@0 | 8 conf.N = 80; |
wolffd@0 | 9 conf.MAX_INC = 10; |
wolffd@0 | 10 |
wolffd@0 | 11 % use the specific parameters from the paper |
wolffd@0 | 12 switch type |
wolffd@0 | 13 |
wolffd@0 | 14 case 'svm' |
wolffd@0 | 15 conf.params = [0.7 0.7 0.1 2.0e-5]; |
wolffd@0 | 16 case 'grad' |
wolffd@0 | 17 conf.params = [0.05 0.1 0.1 2.0e-5]; |
wolffd@0 | 18 otherwise |
wolffd@0 | 19 end |
wolffd@0 | 20 |
wolffd@0 | 21 % load data |
wolffd@0 | 22 feature_file = 'rel_music_raw_features+simdata_ISMIR12'; |
wolffd@0 | 23 vars = whos('-file', feature_file); |
wolffd@0 | 24 A = load(feature_file,vars(1).name,vars(2).name,vars(3).name,vars(4).name); |
wolffd@0 | 25 data = A.(vars(1).name); |
wolffd@0 | 26 conf.sNum = size(data,1); |
wolffd@0 | 27 |
wolffd@0 | 28 mod = struct(); |
wolffd@0 | 29 [mod.W_max{1} mod.vB_max{1} mod.hB_max{1}] = training_rbm(conf,zeros(0,0),feature_file); |
wolffd@0 | 30 |