예제 #1
0
def run_experiments_mnist():

    n_hiddens = 1024
    n_layers = 5
    n_comps = 10
    act_fun = 'relu'
    mode = 'sequential'

    ex.load_data('mnist')

    ex.train_made([n_hiddens] * 2, act_fun, mode)
    ex.train_made_cond([n_hiddens] * 2, act_fun, mode)

    ex.train_mog_made([n_hiddens] * 2, act_fun, n_comps, mode)
    ex.train_mog_made_cond([n_hiddens] * 2, act_fun, n_comps, mode)

    for i in [1, 2]:

        ex.train_realnvp([n_hiddens] * 2, 'tanh', 'relu', n_layers * i)
        ex.train_realnvp_cond([n_hiddens] * 2, 'tanh', 'relu', n_layers * i)

        ex.train_maf([n_hiddens] * 2, act_fun, n_layers * i, mode)
        ex.train_maf_cond([n_hiddens] * 2, act_fun, n_layers * i, mode)

    ex.train_maf_on_made([n_hiddens] * 2, act_fun, n_layers, n_comps, mode)
    ex.train_maf_on_made_cond([n_hiddens] * 2, act_fun, n_layers, n_comps,
                              mode)
예제 #2
0
def run_experiments_hepmass():

    n_hiddens = 512
    n_layers = 5
    n_comps = 10
    act_fun = 'relu'
    mode = 'sequential'

    ex.load_data('hepmass')

    ex.train_made([n_hiddens] * 1, act_fun, mode)
    ex.train_made([n_hiddens] * 2, act_fun, mode)

    ex.train_mog_made([n_hiddens] * 1, act_fun, n_comps, mode)
    ex.train_mog_made([n_hiddens] * 2, act_fun, n_comps, mode)

    ex.train_realnvp([n_hiddens] * 1, 'tanh', 'relu', n_layers * 1)
    ex.train_realnvp([n_hiddens] * 2, 'tanh', 'relu', n_layers * 1)
    ex.train_realnvp([n_hiddens] * 1, 'tanh', 'relu', n_layers * 2)
    ex.train_realnvp([n_hiddens] * 2, 'tanh', 'relu', n_layers * 2)

    ex.train_maf([n_hiddens] * 1, act_fun, n_layers * 1, mode)
    ex.train_maf([n_hiddens] * 2, act_fun, n_layers * 1, mode)
    ex.train_maf([n_hiddens] * 1, act_fun, n_layers * 2, mode)
    ex.train_maf([n_hiddens] * 2, act_fun, n_layers * 2, mode)

    ex.train_maf_on_made([n_hiddens] * 1, act_fun, n_layers, n_comps, mode)
    ex.train_maf_on_made([n_hiddens] * 2, act_fun, n_layers, n_comps, mode)
예제 #3
0
def run_experiments_bsds300():

    n_layers = 5
    n_comps = 10
    act_fun = 'relu'
    mode = 'sequential'

    ex.load_data('bsds300')

    for n_hiddens in [512, 1024]:

        ex.train_made([n_hiddens] * 1, act_fun, mode)
        ex.train_made([n_hiddens] * 2, act_fun, mode)

        ex.train_mog_made([n_hiddens] * 1, act_fun, n_comps, mode)
        ex.train_mog_made([n_hiddens] * 2, act_fun, n_comps, mode)

        ex.train_realnvp([n_hiddens] * 1, 'tanh', 'relu', n_layers * 1)
        ex.train_realnvp([n_hiddens] * 2, 'tanh', 'relu', n_layers * 1)
        ex.train_realnvp([n_hiddens] * 1, 'tanh', 'relu', n_layers * 2)
        ex.train_realnvp([n_hiddens] * 2, 'tanh', 'relu', n_layers * 2)

        ex.train_maf([n_hiddens] * 1, act_fun, n_layers * 1, mode)
        ex.train_maf([n_hiddens] * 2, act_fun, n_layers * 1, mode)
        ex.train_maf([n_hiddens] * 1, act_fun, n_layers * 2, mode)
        ex.train_maf([n_hiddens] * 2, act_fun, n_layers * 2, mode)

        ex.train_maf_on_made([n_hiddens] * 1, act_fun, n_layers, n_comps, mode)
        ex.train_maf_on_made([n_hiddens] * 2, act_fun, n_layers, n_comps, mode)
예제 #4
0
def run_experiments_cifar10():

    n_layers = 5
    n_comps = 10
    act_fun = 'relu'
    mode = 'random'

    ex.load_data('cifar10')

    for n_hiddens in [1024, 2048]:

        ex.train_made([n_hiddens] * 1, act_fun, mode)
        ex.train_made([n_hiddens] * 2, act_fun, mode)
        ex.train_made_cond([n_hiddens] * 1, act_fun, mode)
        ex.train_made_cond([n_hiddens] * 2, act_fun, mode)

        ex.train_mog_made([n_hiddens] * 1, act_fun, n_comps, mode)
        ex.train_mog_made([n_hiddens] * 2, act_fun, n_comps, mode)
        ex.train_mog_made_cond([n_hiddens] * 1, act_fun, n_comps, mode)
        ex.train_mog_made_cond([n_hiddens] * 2, act_fun, n_comps, mode)

        for i in [1, 2]:

            ex.train_realnvp([n_hiddens] * 1, 'tanh', 'relu', n_layers * i)
            ex.train_realnvp([n_hiddens] * 2, 'tanh', 'relu', n_layers * i)
            ex.train_realnvp_cond([n_hiddens] * 1, 'tanh', 'relu',
                                  n_layers * i)
            ex.train_realnvp_cond([n_hiddens] * 2, 'tanh', 'relu',
                                  n_layers * i)

            ex.train_maf([n_hiddens] * 1, act_fun, n_layers * i, mode)
            ex.train_maf([n_hiddens] * 2, act_fun, n_layers * i, mode)
            ex.train_maf_cond([n_hiddens] * 1, act_fun, n_layers * i, mode)
            ex.train_maf_cond([n_hiddens] * 2, act_fun, n_layers * i, mode)

        ex.train_maf_on_made([n_hiddens] * 1, act_fun, n_layers, n_comps, mode)
        ex.train_maf_on_made([n_hiddens] * 2, act_fun, n_layers, n_comps, mode)
        ex.train_maf_on_made_cond([n_hiddens] * 1, act_fun, n_layers, n_comps,
                                  mode)
        ex.train_maf_on_made_cond([n_hiddens] * 2, act_fun, n_layers, n_comps,
                                  mode)