Esempio n. 1
0
 def setUp(self):
     self.n_samples = 10
     self.layer = NADE(
                     n_X=16,
                     n_Y=8,
                     n_hid=8,
                 )
     self.layer.setup()
Esempio n. 2
0
class TestNADE(RWSLayerTest, unittest.TestCase):
    def setUp(self):
        self.n_samples = 10
        self.layer = NADE(
                        n_X=16,
                        n_Y=8,
                        n_hid=8,
                    )
        self.layer.setup()
Esempio n. 3
0
 def setUp(self):
     self.n_samples = 10
     self.layer = NADE(n_X=16, n_Y=8, n_hid=8)
     self.layer.setup()
Esempio n. 4
0
class TestNADE(RWSLayerTest, unittest.TestCase):
    def setUp(self):
        self.n_samples = 10
        self.layer = NADE(n_X=16, n_Y=8, n_hid=8)
        self.layer.setup()
Esempio n. 5
0
from learning.models.rws import LayerStack
from learning.models.sbn import SBN, SBNTop
from learning.models.darn import DARN, DARNTop
from learning.models.nade import NADE, NADETop

n_vis = 28 * 28

preproc = PermuteColumns()

dataset = CalTechSilhouettes(which_set='train', preproc=[preproc])
valiset = CalTechSilhouettes(which_set='valid', preproc=[preproc])
testset = CalTechSilhouettes(which_set='test', preproc=[preproc])

p_layers = [
    NADE(
        n_X=n_vis,
        n_Y=150,
    ),
    NADETop(n_X=150, ),
]

q_layers = [
    NADE(
        n_Y=n_vis,
        n_X=150,
    ),
]

model = LayerStack(
    p_layers=p_layers,
    q_layers=q_layers,
)
Esempio n. 6
0
from learning.models.rws  import LayerStack
from learning.models.sbn  import SBN, SBNTop
from learning.models.darn import DARN, DARNTop
from learning.models.nade import NADE, NADETop

n_vis = 28*28

permute = PermuteColumns()
dataset = MNIST(fname="mnist_salakhutdinov.pkl.gz", which_set='salakhutdinov_train', preproc=[permute], n_datapoints=50000)
valiset = MNIST(fname="mnist_salakhutdinov.pkl.gz", which_set='salakhutdinov_valid', preproc=[permute], n_datapoints=1000)
testset = MNIST(fname="mnist_salakhutdinov.pkl.gz", which_set='test', preproc=[permute], n_datapoints=10000)

p_layers=[
    NADE(
        n_X=n_vis,
        n_Y=200,
        clamp_sigmoid=True,
    ),
    NADETop( 
        n_X=200,
        clamp_sigmoid=True,
    ),
]

q_layers=[
    NADE(
        n_Y=n_vis,
        n_X=200,
        clamp_sigmoid=True,
    )
]
Esempio n. 7
0
        n_Y=100,
    ),
    SBN(
        n_X=100,
        n_Y=50,
    ),
    SBN(
        n_X=50,
        n_Y=10,
    ),
    SBNTop(n_X=10, )
]

q_layers = [
    NADE(
        n_Y=n_vis,
        n_X=300,
    ),
    NADE(
        n_Y=300,
        n_X=100,
    ),
    NADE(
        n_Y=100,
        n_X=50,
    ),
    NADE(
        n_Y=50,
        n_X=10,
    )
]