db19408b9dba8b85a16d9a7b58c5bb366d600c7c,examples/transformer/transformer_overall.py,,,#,16

Before Change


    if args.load_from_pytorch:
        encoder_input = ori_src_text
    else:
        encoder_input = ori_src_text[:, 1:]

    decoder_input = ori_tgt_text[:, :-1]
    labels = ori_tgt_text[:, 1:]

After Change


            elif args.model_dir == "max":
                args.model_dir = args.log_dir + "./max/"
                eval_saver.restore(sess. tf.train.latest_checkpoint(args.model_dir))
                mname = tf.train.latest_checkpoint(args.model_dir).split("/")[-1]
            else:
                print("load model from {}".format(args.model_fullpath))
                mname = args.model_fullpaths.split("/")[-1]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: asyml/texar
Commit Name: db19408b9dba8b85a16d9a7b58c5bb366d600c7c
Time: 2018-04-26
Author: shore@pku.edu.cn
File Name: examples/transformer/transformer_overall.py
Class Name:
Method Name:


Project Name: tensorflow/models
Commit Name: f2ea2f537967af92fd47eeeb91b0e312aedaddad
Time: 2019-05-24
Author: tobyboyd@google.com
File Name: official/transformer/v2/transformer_main.py
Class Name: TransformerTask
Method Name: eval


Project Name: haotianteng/Chiron
Commit Name: 2ca285b61fb8280243a55b37d76297cd109328c8
Time: 2019-04-12
Author: havens.teng@gmail.com
File Name: chiron/chiron_eval_test.py
Class Name:
Method Name: