Exemple #1
0
def main(_):
    console.start('{} on TO task'.format(model_name.upper()))

    th = core.th
    # ---------------------------------------------------------------------------
    # 0. date set setup
    # ---------------------------------------------------------------------------
    th.sequence_length = 100
    th.bits = 3

    # ---------------------------------------------------------------------------
    # 1. folder/file names and device
    # ---------------------------------------------------------------------------
    th.job_dir += '/{:02d}_{}'.format(id, model_name)
    summ_name = model_name
    th.visible_gpu_id = 0
    th.prefix = '{}_'.format(date_string())
    th.suffix = ''

    # ---------------------------------------------------------------------------
    # 2. model setup
    # ---------------------------------------------------------------------------
    th.model = model

    th.fast_layers = 2
    table = {2: 41, 3: 45, 4: 47, 5: 49, 6: 50}
    th.fast_size = table[th.fast_layers]
    th.slow_size = th.fast_size
    th.hyper_kernel = 'lstm'

    th.forget_bias_initializer = 2.0
    # ---------------------------------------------------------------------------
    # 3. trainer setup
    # ---------------------------------------------------------------------------
    th.max_iterations = 50000
    th.optimizer = tf.train.AdamOptimizer
    th.learning_rate = 0.001

    # ---------------------------------------------------------------------------
    # 4. summary and note setup
    # ---------------------------------------------------------------------------
    th.export_tensors_upon_validation = True

    # ---------------------------------------------------------------------------
    # 5. other stuff and activate
    # ---------------------------------------------------------------------------
    tail = '_{}bits_L{}'.format(th.bits, th.sequence_length)
    th.mark = FastSlow.mark() + tail
    th.gather_summ_name = th.prefix + summ_name + tail + th.suffix + '.sum'
    core.activate()
Exemple #2
0
def main(_):
    console.start('{} on TO task'.format(model_name.upper()))

    th = core.th
    # ---------------------------------------------------------------------------
    # 0. date set setup
    # ---------------------------------------------------------------------------
    th.sequence_length = 100
    th.bits = 3

    # ---------------------------------------------------------------------------
    # 1. folder/file names and device
    # ---------------------------------------------------------------------------
    th.job_dir += '/{:02d}_{}'.format(id, model_name)
    summ_name = model_name
    th.visible_gpu_id = 0
    th.prefix = '{}_'.format(date_string())
    th.suffix = ''

    # ---------------------------------------------------------------------------
    # 2. model setup
    # ---------------------------------------------------------------------------
    th.model = model

    th.gam_config = '6x10'
    th.head_size = 10

    th.hyper_kernel = 'gru'
    th.state_size = 60
    th.num_layers = 1

    # ---------------------------------------------------------------------------
    # 3. trainer setup
    # ---------------------------------------------------------------------------
    th.max_iterations = 50000
    th.optimizer = tf.train.AdamOptimizer
    th.learning_rate = 0.001

    # ---------------------------------------------------------------------------
    # 4. summary and note setup
    # ---------------------------------------------------------------------------
    th.export_tensors_upon_validation = True

    # ---------------------------------------------------------------------------
    # 5. other stuff and activate
    # ---------------------------------------------------------------------------
    tail = '_{}bits_L{}'.format(th.bits, th.sequence_length)
    th.mark = GamRHN.mark() + tail
    th.gather_summ_name = th.prefix + summ_name + tail + th.suffix + '.sum'
    core.activate()
Exemple #3
0
def main(_):
    console.start('{} on TO task'.format(model_name.upper()))

    th = core.th
    # ---------------------------------------------------------------------------
    # 0. date set setup
    # ---------------------------------------------------------------------------
    th.sequence_length = 200
    th.bits = 3

    # ---------------------------------------------------------------------------
    # 1. folder/file names and device
    # ---------------------------------------------------------------------------
    th.job_dir += '/{:02d}_{}'.format(id, model_name)
    summ_name = model_name
    th.visible_gpu_id = 0
    prefix = '{}_'.format(date_string())
    suffix = ''

    # ---------------------------------------------------------------------------
    # 2. model setup
    # ---------------------------------------------------------------------------
    th.model = model
    th.state_size = 67

    th.forget_bias_initializer = 2.0
    # ---------------------------------------------------------------------------
    # 3. trainer setup
    # ---------------------------------------------------------------------------
    th.max_iterations = 10000
    th.optimizer = tf.train.AdamOptimizer
    th.learning_rate = 0.001

    # ---------------------------------------------------------------------------
    # 4. summary and note setup
    # ---------------------------------------------------------------------------
    th.export_tensors_upon_validation = True

    # ---------------------------------------------------------------------------
    # 5. other stuff and activate
    # ---------------------------------------------------------------------------
    tail = '_{}bits_L{}'.format(th.bits, th.sequence_length) + suffix
    th.mark = prefix + '{}({})'.format(model_name, th.state_size) + tail
    th.gather_summ_name = prefix + summ_name + tail + '.sum'
    core.activate()