4b4946f40ef0f8c533f5473ec3756e639e57e5c5,python/baseline/dy/dynety.py,,show_examples_dynet,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,487

Before Change


        tgt_array = tgt_array[0:max_examples]
        src_len = src_len[0:max_examples]

    for src_len_i, src_i, tgt_i in zip(src_len, src_array, tgt_array):

        print("========================================================================")
        src_len_i = np.array(src_len_i, ndmin=1)
        sent = lookup_sentence(rlut1, src_i, reverse=reverse)
        print("[OP] %s" % sent)
        sent = lookup_sentence(rlut2, tgt_i)
        print("[Actual] %s" % sent)
        src_dict = {"src": src_i.reshape(1, -1), "src_len": src_len_i}
        dst_i = model.run(src_dict)[0]
        sent = lookup_sentence(rlut2, dst_i)
        print("Guess: %s" % sent)
        print("------------------------------------------------------------------------")

After Change


        print("========================================================================")
        sent = lookup_sentence(rlut1, example[src_field].squeeze(), reverse=reverse)
        print("[OP] %s" % sent)
        sent = lookup_sentence(rlut2, example["tgt"].squeeze())
        print("[Actual] %s" % sent)
        dst_i = model.run(example)[0]
        sent = lookup_sentence(rlut2, dst_i)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: dpressel/mead-baseline
Commit Name: 4b4946f40ef0f8c533f5473ec3756e639e57e5c5
Time: 2018-09-28
Author: dpressel@gmail.com
File Name: python/baseline/dy/dynety.py
Class Name:
Method Name: show_examples_dynet


Project Name: Kaixhin/Rainbow
Commit Name: d5a60e49538e4f61fd46468895fa42df2a429d95
Time: 2017-11-11
Author: design@kaixhin.com
File Name: agent.py
Class Name: Agent
Method Name: learn


Project Name: dpressel/mead-baseline
Commit Name: 3218a3987ef9f83d1ad5efd6f96d6f6c741c3cfa
Time: 2019-09-27
Author: dpressel@gmail.com
File Name: python/eight_mile/pytorch/layers.py
Class Name:
Method Name: viterbi


Project Name: osmr/imgclsmob
Commit Name: 1efbf1f1acbc58b3dfced87843f323b20c44f399
Time: 2019-03-12
Author: osemery@gmail.com
File Name: gluon/cifar.py
Class Name: SVHN
Method Name: _get_data