Exemple #1
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/uci_large/hepmass')

    conf.num_workers = 2
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 20000, '1': 20000}

    exp.data_loader = registry.hepmass(x_slice=slice(0), y_slice=slice(None))

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_BLOCK"))

    exp.hyper_param_search = GridSearch([
        Categorical([8, 10], name='nl'),
        Categorical([60, 80], name='nb'),
        Categorical(['tanh'], name='tr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/mv_nonlinear')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.mv_nonlinear()

    exp.model_factory = TfTrainEvalModelFactory(
        Model(name="RNADE_deep_normal"))

    exp.hyper_param_search = GridSearch([
        Categorical([32, 64, 128], name='km'),
        Categorical([64, 128, 512], name='sh'),
        Categorical([1, 2, 3, 4, 5], name='nh'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])
Exemple #3
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/sin_t')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.sin_t_noise()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="RNADE_laplace"))

    exp.hyper_param_search = GridSearch([
        Categorical([1, 16, 32, 64, 128], name='km'),
        Categorical([1, 16, 32, 64, 128], name='sh'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemple #4
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/uci_large/miniboone')

    conf.num_workers = 2
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 20000, '1': 20000}

    exp.data_loader = registry.miniboone(x_slice=slice(0), y_slice=slice(None))

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_BLOCK"))

    exp.hyper_param_search = GridSearch([
        Categorical([3, 5, 7, 8], name='nl'),
        Categorical([10, 50, 80], name='nb'),
        Categorical(['tanh'], name='tr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])
Exemple #5
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/inv_sin_normal')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.inv_sin_normal()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MAF"))

    exp.hyper_param_search = GridSearch([
        Categorical([1, 2, 3, 4, 5], name='nb'),
        Categorical([32, 128, 256], name='sh'),
        Categorical([1, 2, 3], name='nh'),
        Categorical([16, 32, 64], name='shc'),
        Categorical([True, False], name='bn'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])
Exemple #6
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/uci_large/gas')

    conf.num_workers = 2
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 50000, '1': 50000}

    exp.data_loader = registry.gas(x_slice=slice(0), y_slice=slice(None))

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_BLOCK"))

    exp.hyper_param_search = GridSearch([
        Categorical([8, 10], name='nl'),
        Categorical([60, 80], name='nb'),
        Categorical(['tanh'], name='tr'),

        Categorical([128], name='bs'),
        Categorical([1], name='rs'),

        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])
Exemple #7
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/inv_sin_t')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.inv_sin_t()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MAF"))

    exp.hyper_param_search = GridSearch([
        Categorical([1, 2, 3, 4, 5], name='nb'),
        Categorical([32, 128, 256], name='sh'),
        Categorical([1, 2, 3], name='nh'),
        Categorical([16, 32, 64], name='shc'),
        Categorical([True, False], name='bn'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])
Exemple #8
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/sin_normal')

    conf.num_workers = 4
    conf.visible_device_list = [0,1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.sin_normal_noise()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MDN"))

    exp.hyper_param_search = GridSearch([
        Categorical([16,64,128], name='nm'),
        Categorical([32,64, 128], name='sh'),
        Categorical([1,2,3], name='nh'),

        Categorical([128], name='bs'),
        Categorical([1], name='rs'),

        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4,1e-3,1e-2], name='opt_lr'),
    ])
    tf_conf.save_checkpoints_epochs = 1
    tf_conf.check_nans = True
    tf_conf.start_eval_step = 1
    tf_conf.per_process_gpu_memory_fraction = 0.2

    symbols = [
        "AUDCAD", "AUDJPY", "AUDNZD", "EURCHF", "NZDCAD", "NZDJPY", "NZDUSD",
        "USDCHF", "USDJPY", "EURUSD", "GBPUSD", "USDCAD"
    ]

    exp.data_loader = fx(x_slice=slice(None, -3),
                         y_slice=slice(-3, None),
                         ar_terms=1,
                         start='2018-01-01',
                         end='2018-03-31',
                         symbols=symbols,
                         predicted_idx=None,
                         resample="1min",
                         data_transforms={
                             'labels':
                             PercentileAnyGreaterLabelTransform(percentile=95)
                         })

    exp.model_factory = TfSimpleTrainEvalModelFactory(NNClassifier())

    exp.hyper_param_search = GridSearch([
        Categorical([2, 3, 5], name='nl'),
        Categorical([50, 100], name='sl'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical([3], name='bsi'),
        Categorical([20], name='bsip'),
Exemple #10
0
    conf.eval_batch_size = 10000

    tf_conf.eval_throttle_secs = 0
    tf_conf.save_summary_epochs = 1
    tf_conf.save_checkpoints_epochs = 1
    tf_conf.check_nans = True
    tf_conf.start_eval_step = 1
    tf_conf.per_process_gpu_memory_fraction = 0.2

    symbols = ["AUDCAD", "AUDJPY", "AUDNZD", "EURCHF", "NZDCAD", "NZDJPY", "NZDUSD", "USDCHF", "USDJPY",
               "EURUSD", "GBPUSD", "USDCAD"]

    exp.data_loader = fx(x_slice=slice(None, -3), y_slice=slice(-3, None),
                         ar_terms=1,
                         start='2018-01-01',
                         end='2018-03-31',
                         symbols=symbols,
                         predicted_idx=None,
                         resample="1min")

    exp.model_factory = TfSimpleTrainEvalModelFactory(Pumonde2())

    exp.hyper_param_search = GridSearch([
        Categorical([3, 4], name='nl1'),
        Categorical([50, 100], name='sl1'),
        Categorical([3, 4], name='nl2'),
        Categorical([50, 100], name='sl2'),
        Categorical([30], name='sxl2'),
        Categorical([3, 4], name='nl3'),
        Categorical([50, 100], name='sl3'),
        Categorical(['square'], name='pt'),
Exemple #11
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/uci_large/power')

    conf.num_workers = 2
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 50000, '1': 50000}

    exp.data_loader = registry.power(x_slice=slice(0), y_slice=slice(None))

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_BLOCK"))

    exp.hyper_param_search = GridSearch([
        Categorical([8, 10], name='nl'),
        Categorical([40, 60], name='nb'),
        Categorical(['tanh'], name='tr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])
Exemple #12
0
from conf import conf
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/uci_large/bsds300')

    conf.num_workers = 2
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 50000, '1': 50000}

    exp.data_loader = registry.bsds300(x_slice=slice(0), y_slice=slice(None))

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_BLOCK"))

    exp.hyper_param_search = GridSearch([
        Categorical([3, 5, 7], name='nl'),
        Categorical([10, 30, 40], name='nb'),
        Categorical(['tanh'], name='tr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])