Example #1
0
def nnet1_template(dataset_name='skdata.larochelle_etal_2007.Rectangles',
            sup_min_epochs=30, # THESE ARE KINDA SMALL FOR SERIOUS RESULTS
            sup_max_epochs=400):
    template = rSON2(
        'preprocessing', one_of(
            rSON2(
                'kind', 'raw'),
            rSON2(
                'kind', 'zca',
                'energy', uniform(0.5, 1.0))),
        'dataset_name', dataset_name,
        'sup_max_epochs', sup_max_epochs,
        'sup_min_epochs', sup_min_epochs,
        'iseed', one_of(5, 6, 7, 8),
        'batchsize', one_of(20, 100),
        'lr', lognormal(numpy.log(.01), 3),
        'lr_anneal_start', geom(100, 10000),
        'l2_penalty', one_of(0, lognormal(numpy.log(1.0e-6), 3)),
        'next_layer', rSON2(
            'n_hid', geom(2**4, 2**10, round=16),
            'W_init_dist', one_of('uniform', 'normal'),
            'W_init_algo', one_of('old', 'Xavier'),
            'W_init_algo_old_multiplier', uniform(.2, 2),
            'cd_epochs', 0,
            'cd_batchsize', 100,
            'cd_sample_v0s', one_of(False, True),
            'cd_lr', lognormal(numpy.log(.01), 3),
            'cd_lr_anneal_start', geom(10, 10000),
            'next_layer', None))
    return template
def dbn_template(dataset_name='skdata.larochelle_etal_2007.Rectangles',
                 sup_min_epochs=300,
                 sup_max_epochs=4000):
    template = rSON2(
        'preprocessing',
        one_of(rSON2('kind', 'raw'),
               rSON2('kind', 'zca', 'energy', uniform(0.5, 1.0))),
        'dataset_name', dataset_name, 'sup_max_epochs',
        sup_max_epochs, 'sup_min_epochs', sup_min_epochs, 'iseed',
        one_of(5, 6, 7, 8), 'batchsize', one_of(20, 100), 'lr',
        lognormal(numpy.log(.01),
                  3), 'lr_anneal_start', geom(100, 10000), 'l2_penalty',
        one_of(0, lognormal(numpy.log(1.0e-6), 2)), 'next_layer',
        one_of(
            None,
            rSON2(
                'n_hid', geom(2**7, 2**12, round=16), 'W_init_dist',
                one_of('uniform', 'normal'), 'W_init_algo',
                one_of('old', 'Xavier'), 'W_init_algo_old_multiplier',
                lognormal(0.0, 1.0), 'cd_epochs', geom(1, 3000),
                'cd_batchsize', 100, 'cd_sample_v0s', one_of(False,
                                                             True), 'cd_lr',
                lognormal(numpy.log(.01), 2), 'cd_lr_anneal_start',
                geom(10, 10000), 'next_layer',
                one_of(
                    None,
                    rSON2(
                        'n_hid', geom(2**7, 2**12, round=16), 'W_init_dist',
                        one_of('uniform', 'normal'), 'W_init_algo',
                        one_of('old', 'Xavier'), 'W_init_algo_old_multiplier',
                        lognormal(0.0, 1.0), 'cd_epochs', geom(1, 2000),
                        'cd_batchsize', 100, 'cd_sample_v0s',
                        one_of(False, True), 'cd_lr',
                        lognormal(numpy.log(.01), 2), 'cd_lr_anneal_start',
                        geom(10, 10000), 'next_layer',
                        one_of(
                            None,
                            rSON2(
                                'n_hid',
                                geom(2**7, 2**12, round=16),
                                'W_init_dist',
                                one_of('uniform', 'normal'),
                                'W_init_algo',
                                one_of('old', 'Xavier'),
                                'W_init_algo_old_multiplier',
                                lognormal(0., 1.),
                                'cd_epochs',
                                geom(1, 1500),
                                'cd_batchsize',
                                100,
                                'cd_sample_v0s',
                                one_of(False, True),
                                'cd_lr',
                                lognormal(numpy.log(.01), 2),
                                'cd_lr_anneal_start',
                                geom(10, 10000),
                                'next_layer',
                                None,
                            )))))))
    return template
Example #3
0
 def __init__(self):
     Base.__init__(self, rSON2('x', lognormal(0, 2)))