def setup(self, model, dataset):
     x = dataset.get_batch_design(10000, include_labels=False)
     ml_vbias = rbm_utils.compute_ml_bias(x)
     model.vbias.set_value(ml_vbias)
     pval_v = sigm(model.vbias.get_value())
     neg_v = model.rng.binomial(n=1, p=pval_v, size=(model.batch_size, model.n_v))
     model.neg_v.set_value(neg_v.astype(floatX))
     super(TrainingAlgorithm, self).setup(model, dataset)
Beispiel #2
0
 def setup(self, model, dataset):
     x = dataset.get_batch_design(10000, include_labels=False)
     ml_vbias = rbm_utils.compute_ml_bias(x)
     model.vbias.set_value(ml_vbias)
     pval_v = sigm(model.vbias.get_value())
     neg_v = model.rng.binomial(n=1,
                                p=pval_v,
                                size=(model.batch_size, model.n_v))
     model.neg_v.set_value(neg_v.astype(floatX))
     super(TrainingAlgorithm, self).setup(model, dataset)
Beispiel #3
0
 def init_parameters_from_data(self, x):
     if self.flags['ml_vbias']:
         self.vbias.set_value(rbm_utils.compute_ml_bias(x))
     if self.flags['enable_centering']:
         self.cv.set_value(x.mean(axis=0).astype(floatX))
Beispiel #4
0
 def setup(self, model, dataset):
     super(TrainingAlgorithm, self).setup(model, dataset)
     ml_vbias = rbm_utils.compute_ml_bias(dataset.X[:10000])
     model.vbias.set_value(ml_vbias)
Beispiel #5
0
 def setup(self, model, dataset):
     super(TrainingAlgorithm, self).setup(model, dataset)
     ml_vbias = rbm_utils.compute_ml_bias(dataset.X[:10000])
     model.vbias.set_value(ml_vbias)