39eea80aa70dcbcad57327ce8f9c4a325062fc86,python/baseline/pytorch/torchy.py,,show_examples_pytorch,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,421

Before Change


        sent = lookup_sentence(rlut2, tgt_i)
        print("[Actual] %s" % sent)

        dst_i, scores = beam_decode(model, torch.autograd.Variable(src_i.view(1, -1), requires_grad=False), 1)
        sent = lookup_sentence(rlut2, dst_i[0])
        print("Guess: %s" % sent)
        print("------------------------------------------------------------------------")

After Change


        print("[Actual] %s" % sent)
        src_dict = {"src": torch.autograd.Variable(src_i.view(1, -1), requires_grad=False),
                    "src_len": torch.autograd.Variable(src_len_i, requires_grad=False)}
        dst_i = model.run(src_dict)[0][0]
        sent = lookup_sentence(rlut2, dst_i)
        print("Guess: %s" % sent)
        print("------------------------------------------------------------------------")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dpressel/mead-baseline
Commit Name: 39eea80aa70dcbcad57327ce8f9c4a325062fc86
Time: 2018-04-17
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/torchy.py
Class Name:
Method Name: show_examples_pytorch


Project Name: pytorch/tutorials
Commit Name: 69d978ed497856d05730c05564597e604713f5c4
Time: 2018-09-16
Author: minkawhich@fb.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluate


Project Name: pytorch/tutorials
Commit Name: a61996ae5406ddfee4ac65ab647ebe858fc16260
Time: 2018-09-17
Author: matthewinkawhich@gmail.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluate