Ejemplo n.º 1
0
 def setUp(self):
     self.n_samples = 10
     self.layer = NADETop(
                     n_X=8,
                     n_hid=8,
                 )
     self.layer.setup()
Ejemplo n.º 2
0
class TestNADETop(RWSTopLayerTest, unittest.TestCase):
    def setUp(self):
        self.n_samples = 10
        self.layer = NADETop(
                        n_X=8,
                        n_hid=8,
                    )
        self.layer.setup()
Ejemplo n.º 3
0
 def setUp(self):
     self.n_samples = 10
     self.layer = NADETop(n_X=8, n_hid=8)
     self.layer.setup()
Ejemplo n.º 4
0
class TestNADETop(RWSTopLayerTest, unittest.TestCase):
    def setUp(self):
        self.n_samples = 10
        self.layer = NADETop(n_X=8, n_hid=8)
        self.layer.setup()
Ejemplo n.º 5
0
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,
)

trainer = Trainer(
Ejemplo n.º 6
0
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,
    )
]

model = LayerStack(
    p_layers=p_layers,
    q_layers=q_layers,
)