Ejemplo n.º 1
0
def main(_):
    console.start('Task CNN (MEMBRANE)')

    th = core.th
    th.job_dir = './records_unet_alpha'
    th.model = models.unet
    th.suffix = '01'

    th.batch_size = 2
    th.learning_rate = 1e-4

    th.epoch = 3
    th.early_stop = True
    th.patience = 5
    th.print_cycle = 1
    th.validation_per_round = 4
    th.val_batch_size = 10
    th.validate_train_set = True
    th.export_tensors_upon_validation = True
    # th.probe_cycle = 1
    th.warm_up = False

    th.save_model = True
    th.overwrite = True
    th.gather_note = True
    th.summary = False
    th.warm_up_thres = 0
    #
    th.train = False
    th.mark = 'unet_{}'.format('x')
    core.activate()
Ejemplo n.º 2
0
def main(_):
    console.start('GPAT Classification task (MLP)')

    # Configurations
    th = core.th
    th.model = models.mlp
    th.num_blocks = 2
    th.hidden_dim = 500
    th.actype1 = 'relu'
    th.idle_tol = 30

    th.epoch = 500
    th.learning_rate = 1e-3
    th.batch_size = 64
    th.validation_per_round = 1
    th.print_cycle = 1
    th.shuffle = True

    # th.train = False
    th.smart_train = False
    th.max_bad_apples = 4
    th.lr_decay = 0.6

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    description = 'demo'
    th.mark = 'mlp_{}x{}{}'.format(th.hidden_dim, th.num_blocks, description)

    core.activate()
Ejemplo n.º 3
0
def main(_):
    console.start('MLP task')

    # Configurations
    th = core.th
    th.model = models.mlp
    th.fc_dims = [800, 500]
    th.actype1 = 'relu'

    th.epoch = 50
    th.learning_rate = 1e-5
    th.batch_size = 64
    th.validation_per_round = 2
    th.print_cycle = 20
    th.shuffle = True

    # th.train = False
    th.smart_train = False
    th.max_bad_apples = 4
    th.lr_decay = 0.6

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    description = ''
    th.mark = 'mlp_{}{}'.format(ms(th.fc_dims), description)

    export_false = True
    core.activate(export_false=export_false)
Ejemplo n.º 4
0
def main(_):
    console.start('CNN task ')

    # Configurations
    th = core.th
    # th.model = models.conv_test
    th.model = models.conv_2d_test
    th.actype1 = 'relu'
    th.patience = 100

    th.epoch = 5000
    th.learning_rate = 1e-3
    th.batch_size = 64
    th.validation_per_round = 1
    th.print_cycle = 10
    th.shuffle = False

    # th.train = False
    th.smart_train = True
    th.max_bad_apples = 4
    th.lr_decay = 0.6

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    th.allow_growth = True
    # th.gpu_memory_fraction =
    description = 'conv_2d_add_noise'
    th.mark = 'cnn_{}x{}{}'.format(th.hidden_dim, th.num_blocks, description)

    core.activate()
Ejemplo n.º 5
0
def main(_):
    console.start('LSTM task')

    # Configurations
    th = core.th
    th.model = models.lstm_test
    # th.model = models.lstm
    th.num_blocks = 1
    th.memory_depth = 3
    th.hidden_dim = 100

    th.epoch = 50000
    th.learning_rate = 1e-4
    th.batch_size = 512
    th.num_steps = 100
    th.val_preheat = 500
    th.validation_per_round = 0
    th.validate_cycle = 0
    th.print_cycle = 2

    th.train = True
    th.smart_train = False
    th.max_bad_apples = 4
    th.lr_decay = 0.5

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = False
    th.monitor = False

    description = ''
    th.mark = '{}x{}{}'.format(th.num_blocks, th.memory_depth, description)

    core.activate()
Ejemplo n.º 6
0
def main(_):
    console.start('WHBM task (MLP model)')

    # Configurations
    th = core.th
    th.model = models.mlp
    th.num_blocks = 2
    th.memory_depth = 80
    multiplier = 4
    th.hidden_dim = th.memory_depth * multiplier
    th.actype1 = 'relu'

    th.epoch = 50000
    th.learning_rate = 1e-4
    th.batch_size = 64
    th.validation_per_round = 5
    th.print_cycle = 50
    th.shuffle = True

    # th.train = False
    th.smart_train = True
    th.max_bad_apples = 4
    th.lr_decay = 0.5

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    description = ''
    th.mark = '{}x[{}x{}]{}'.format(th.num_blocks, th.memory_depth, multiplier,
                                    description)

    core.activate()
Ejemplo n.º 7
0
def main(_):
    console.start('basis task')

    # Configurations
    th = core.th
    id = 11
    th.job_dir = 'basis_task'
    th.model = models.multinput_ver_only
    th.actype1 = 'relu'

    th.epoch = 5000
    th.learning_rate = 1e-3
    th.batch_size = 32
    th.validation_per_round = 1
    th.val_batch_size = th.batch_size
    th.print_cycle = 20
    th.patience = 100
    th.shuffle = True

    # th.train = False
    th.smart_train = False
    th.max_bad_apples = 4
    th.lr_decay = 0.6
    th.rand_over_classes = False

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    th.allow_growth = False
    th.gpu_memory_fraction = 0.3

    th.raw_keep_prob = 0.9
    th.mfcc_keep_prob = 0.7
    th.concat_keep_prob = 0.9
    th.fold = 1
    # th.shuffle = False

    th.rand_pos = True
    th.test_all = True
    th.val_on_train_set = False

    th.visible_gpu_id = '1'

    # description = 'raw_data_mfcc_dropout_{}_random_{}_fold_{}'.format(
    #               th.mfcc_keep_prob, th.concat_keep_prob, th.fold)
    # description = 'raw_data_mfcc_dropout_{}_{}'.format(th.mfcc_keep_prob,
    #                                                    th.concat_keep_prob)
    description = 'raw_data_mfcc_model_{}'.format(id)
    # description = 'raw_data_mfcc_simlified_dropout_0.7_reg_0.2_sap_all'
    th.mark = 'cnn_{}'.format(description)

    export_false = True
    core.activate()
Ejemplo n.º 8
0
def main(_):
    console.start('Multinput task')

    # Configurations
    th = core.th
    th.job_dir = 'res_task'
    th.model = models.res_00
    th.actype1 = 'relu'

    th.epoch = 5000
    th.learning_rate = 1e-3
    th.batch_size = 32
    th.validation_per_round = 1
    th.val_batch_size = th.batch_size
    th.print_cycle = 20
    th.patience = 100
    th.shuffle = True

    # th.train = False
    th.smart_train = False
    th.max_bad_apples = 4
    th.lr_decay = 0.6
    th.rand_over_classes = False

    th.save_model = True
    th.overwrite = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    th.allow_growth = False
    th.gpu_memory_fraction = 0.4

    th.raw_keep_prob = 0.9
    th.mfcc_keep_prob = 0.7
    th.concat_keep_prob = 0.9
    th.fold = 0
    # th.shuffle = False

    th.rand_pos = True

    th.visible_gpu_id = '0'

    # description = 'cnn_raw_data_mfcc_random_rand'
    description = 'raw_data_mfcc_dropout_{}_{}'.format(th.mfcc_keep_prob,
                                                       th.concat_keep_prob)
    th.mark = 'cnn_{}'.format(description)

    export_false = True
    core.activate()
Ejemplo n.º 9
0
def main(_):
    console.start('LSTM task on GPAT')

    core.train_size = 50
    core.val_size = 4
    core.batches_per_epoch = 1000

    # Configurations
    th = core.th
    th.job_dir = core.from_gpat('lstm_task')
    th.model = models.lstm0
    th.input_shape = [1000]
    input_dim = th.input_shape[0]

    # th.rc_dims = [1000, 41]
    th.rc_dims = [500]

    th.fc_dims = []

    th.epoch = 1000
    th.learning_rate = 0.1
    th.batch_size = 20
    th.num_steps = 4

    th.validate_cycle = 200
    # th.validation_per_round = 10
    th.print_cycle = 1
    th.notify_when_reset = True
    th.early_stop = True
    th.idle_tol = 50

    # th.train = False
    # th.overwrite = True
    th.save_model = True
    th.export_note = True
    th.summary = True
    th.monitor = False

    description = '_t{}v{}lr{}'.format(core.train_size, core.val_size,
                                       th.learning_rate)
    th.mark = 'i{}_rc({})_s{}_bs{}'.format(input_dim, ms(th.rc_dims),
                                           th.num_steps, th.batch_size)
    if len(th.fc_dims) > 0: th.mark += '_fc({})'.format(ms(th.fc_dims))
    th.mark += description

    core.activate()
Ejemplo n.º 10
0
def main(_):
  console.start('FC-LSTM task on GPAT')

  core.train_size = 8
  core.val_size = 2

  # Configurations
  th = core.th
  th.job_dir = core.from_gpat('fc_records')
  th.model = models.fc_lstm
  th.input_shape = [2000]
  input_dim = th.input_shape[0]

  th.fc_dims = [1000]
  th.rc_dims = [41]

  th.epoch = 1000
  th.learning_rate = 0.1
  th.batch_size = 1
  th.num_steps = 10

  # th.validate_cycle = 100
  th.validation_per_round = 2
  th.print_cycle = 1
  th.notify_when_reset = True
  th.early_stop = True
  th.idle_tol = 50

  # th.train = False
  th.overwrite = True
  th.save_model = True
  th.export_note = True
  th.summary = True
  th.monitor = False

  description = '_t8v2_0'
  th.mark = 'i{}_fc({})_rc({})'.format(
    input_dim, ms(th.fc_dims), ms(th.rc_dims))
  th.mark += description

  core.activate()