def test_ml_updates(): r = ssrbm.ssRBM(n_h=nh, n_v=nv, bw_h=bwh, iscales={ 'Wv': 0.1, 'hbias': 0., 'alpha': 1., 'mu': 0., 'beta': 1. }, compile=True, batch_size=batch_size, sp_weight={'h': 0.}, sp_targ={'h': 0.}, sparse_hmask=sparse_masks.SparsityMask.unfactored_g( nh, nh, bwh, bwh), parametrize_sqrt_precision=False, l1={ 'Wh': 0., 'Wv': 0. }, l2={ 'Wh': 0., 'Wv': 0. }) x = numpy.random.rand(batch_size, nv) r.batch_train_func(x)
def quick_alloc(): r = ssrbm.ssRBM(n_h=nh, n_v=nv, bw_h=bwh, iscales={ 'Wv': 0.1, 'hbias': 0., 'alpha': 1., 'mu': 0., 'beta': 1. }, compile=False, batch_size=batch_size, sp_weight={'h': 0.}, sp_targ={'h': 0.}, sparse_hmask=sparse_masks.SparsityMask.unfactored_g( nh, nh, bwh, bwh), parametrize_sqrt_precision=False, l1={ 'Wh': 0., 'Wv': 0. }, l2={ 'Wh': 0., 'Wv': 0. }) r.Wv.set_value(Wv) r.hbias.set_value(hbias) r.mu.set_value(mu) r.alpha.set_value(alpha) r.beta.set_value(beta) return r
def test_ml_updates(): r = ssrbm.ssRBM(n_h=nh, n_v=nv, bw_h=bwh, iscales={'Wv': 0.1, 'hbias':0., 'alpha':1., 'mu':0., 'beta':1.}, compile=True, batch_size=batch_size, sp_weight={'h':0.}, sp_targ={'h':0.}, sparse_hmask = sparse_masks.SparsityMask.unfactored_g(nh,nh,bwh,bwh), parametrize_sqrt_precision = False, l1={'Wh':0.,'Wv':0.}, l2={'Wh':0.,'Wv':0.}) x = numpy.random.rand(batch_size, nv) r.batch_train_func(x)
def quick_alloc(): r = ssrbm.ssRBM(n_h=nh, n_v=nv, bw_h=bwh, iscales={'Wv': 0.1, 'hbias':0., 'alpha':1., 'mu':0., 'beta':1.}, compile=False, batch_size=batch_size, sp_weight={'h':0.}, sp_targ={'h':0.}, sparse_hmask = sparse_masks.SparsityMask.unfactored_g(nh,nh,bwh,bwh), parametrize_sqrt_precision = False, l1={'Wh':0.,'Wv':0.}, l2={'Wh':0.,'Wv':0.}) r.Wv.set_value(Wv) r.hbias.set_value(hbias) r.mu.set_value(mu) r.alpha.set_value(alpha) r.beta.set_value(beta) return r