247203f29b7e841204c76d922c1ea5b2680c3663,reagent/model_utils/seq2slate_utils.py,,per_symbol_to_per_seq_probs,#Any#Any#,115

Before Change


    // tgt_out_idx shape: batch_size, seq_len
    // output shape: batch_size, 1
    return torch.prod(
        torch.gather(per_symbol_probs, 2, tgt_out_idx.unsqueeze(-1)).squeeze(2),
        dim=1,
        keepdim=True,
    )

After Change


    // output shape: batch_size, 1
    return (
        torch.prod(
            torch.gather(per_symbol_probs, 2, tgt_out_idx.unsqueeze(2)).squeeze(2),
            dim=1,
            keepdim=True,
        )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: facebookresearch/Horizon
Commit Name: 247203f29b7e841204c76d922c1ea5b2680c3663
Time: 2020-12-08
Author: czxttkl@fb.com
File Name: reagent/model_utils/seq2slate_utils.py
Class Name:
Method Name: per_symbol_to_per_seq_probs


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: 7e72bea839547db89cf555768d209f468f7be3ce
Time: 2017-10-25
Author: rluo@ttic.edu
File Name: misc/utils.py
Class Name: LanguageModelCriterion
Method Name: forward