583deefa3a0d9d320293ea3194433956269a4a63,chiron/chiron_rcnn_train.py,,train,#,36

Before Change


    summary = tf.summary.merge_all()

    sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True))
    save_model()
    if FLAGS.retrain == False:
        sess.run(init)
        print("Model init finished, begin loading data. \n")
    else:

After Change


    y_shape = tf.placeholder(tf.int64)
    y = tf.SparseTensor(y_indexs, y_values, y_shape)
    default_config = os.path.join(FLAGS.log_dir,FLAGS.model_name,"model.json")
    if FLAGS.retrain:
        if os.path.isfile(default_config):
            config_file = default_config
        else:
            raise ValueError("Model Json file has not been found in model log directory")
    else:
        config_file = FLAGS.configuration   
    config = model.read_config(config_file)
    logits, ratio = model.inference(x, seq_length, training,FLAGS.sequence_len,configure = config)
    ctc_loss = model.loss(logits, seq_length, y)
    opt = model.train_opt(FLAGS.step_rate,FLAGS.max_steps, global_step=global_step)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: haotianteng/Chiron
Commit Name: 583deefa3a0d9d320293ea3194433956269a4a63
Time: 2018-05-07
Author: havens.teng@gmail.com
File Name: chiron/chiron_rcnn_train.py
Class Name:
Method Name: train


Project Name: reinforceio/tensorforce
Commit Name: 06e53497bd69dc90d4d8c7bb5141b1d13db02de8
Time: 2017-06-11
Author: mi.schaarschmidt@gmail.com
File Name: examples/lab_main.py
Class Name:
Method Name: main


Project Name: haotianteng/Chiron
Commit Name: d38f7974c19c355d4b4070a7c0cff949987845d8
Time: 2018-05-18
Author: null
File Name: chiron/chiron_multi_gpu_train.py
Class Name:
Method Name: train