42efaa53edce9b84a98fef1fce24502e6d2ba941,examples/transformer.py,,,#,11

Before Change


                targettxt = [ " ".join([text_database.target_vocab._id_to_token_map_py[i] for i in line]) \
                        for line in target.tolist()]
                writer.add_summary(mgd, global_step=step)
                for index, line in enumerate(zip(source, sourcetxt, target, targettxt)):
                    print("{}:{} source:{} txt:{}".format((step-1)*32+index, step, line[0], line[1]))
                    print("{}:{} target:{} txt:{}".format((step-1)*32+index, step, line[2], line[3]))
                for var in tf.trainable_variables():
                     print("name:{}\tshape:{}\ttype:{}".format(var.name, var.shape, var.dtype))
                if step % 1000 == 0:
                    saver.save(sess, "./logdir/my-model", global_step = step)

After Change


                        for line in source.tolist()]
                targettxt = [ " ".join([text_database.target_vocab._id_to_token_map_py[i] for i in line]) \
                        for line in target.tolist()]
                predicttxt = [ " ".join([text_database.target_vocab._id_to_token_map_py[i] for i in line])\
                        for line in predict.tolist()]
                writer.add_summary(mgd, global_step=step)
                //for index, line in enumerate(zip(source, sourcetxt, target, targettxt, predict, predicttxt)):
                //    print("{}:{} source:{} txt:{}".format((step-1)*32+index, step, line[0], line[1]))
                //    print("{}:{} target:{} txt:{}".format((step-1)*32+index, step, line[2], line[3]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: asyml/texar
Commit Name: 42efaa53edce9b84a98fef1fce24502e6d2ba941
Time: 2017-12-08
Author: shore@pku.edu.cn
File Name: examples/transformer.py
Class Name:
Method Name:


Project Name: aleju/imgaug
Commit Name: 2a1bd4c93a998d16516d82893401b346d66a95e9
Time: 2019-07-19
Author: kontakt@ajung.name
File Name: imgaug/dtypes.py
Class Name:
Method Name: increase_array_resolutions_


Project Name: OpenNMT/OpenNMT-py
Commit Name: 9107c93764e8af783f08b4c8cb2252cd48dc8f32
Time: 2017-09-02
Author: bpeters@coli.uni-saarland.de
File Name: onmt/IO.py
Class Name: ONMTDataset
Method Name: __init__