0b0eabbfd972c9e3f6323bff9d39ac5fc3ba9cc7,transformer/Translator.py,Translator,translate_batch,#Translator#Any#,52

Before Change


                src_seq.size(0) * beam_size, src_seq.size(1)))

        enc_output = Variable(
            enc_output.data.repeat(1, beam_size, 1).view(
                enc_output.size(0) * beam_size, enc_output.size(1), enc_output.size(2)))

        //--- Prepare beams
        beams = [Beam(beam_size, self.opt.cuda) for _ in range(batch_size)]

After Change


        src_seq = src_seq.repeat(1, sz_beam).view(sz_b * sz_beam, len_s)

        sz_b, len_s, d_h = enc_output.size()
        enc_output = enc_output.repeat(1, sz_beam, 1).view( sz_b * sz_beam, len_s, d_h)

        //--- Prepare beams
        beams = [Beam(sz_beam, self.opt.cuda) for _ in range(batch_size)]
        beam_inst_idx_map = {
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 0b0eabbfd972c9e3f6323bff9d39ac5fc3ba9cc7
Time: 2018-08-23
Author: yhhuang@nlg.csie.ntu.edu.tw
File Name: transformer/Translator.py
Class Name: Translator
Method Name: translate_batch


Project Name: arraiy/torchgeometry
Commit Name: 73cae2e3aaed5d66eff0e745bcc49312b8ce5252
Time: 2020-08-31
Author: sj8716643@126.com
File Name: kornia/geometry/transform/imgwarp.py
Class Name:
Method Name: get_rotation_matrix2d


Project Name: osmr/imgclsmob
Commit Name: 7c3d0a5ea7405fe74cc31f5553f7c04d9804d42e
Time: 2019-03-02
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/isqrtcovresnet.py
Class Name: Covpool
Method Name: forward