5ad7a33a04d8829ad3439b5f9390bd136105f986,allennlp/nn/beam_search.py,BeamSearch,search,#BeamSearch#Any#Any#Any#,48

Before Change



        // Reconstruct the sequences.
        // shape: [(batch_size, beam_size, 1)]
        reconstructed_predictions = [predictions[-1].unsqueeze(2)]

        // shape: (batch_size, beam_size)
        cur_backpointers = backpointers[-1]

After Change


            // Keep only the pieces of the state tensors corresponding to the
            // ancestors created this iteration.
            for key, state_tensor in state.items():
                if state_tensor is None:
                    continue
                _, *last_dims = state_tensor.size()
                // shape: (batch_size, beam_size, *)
                expanded_backpointer = backpointer.view(
                    batch_size, self.beam_size, *([1] * len(last_dims))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: allenai/allennlp
Commit Name: 5ad7a33a04d8829ad3439b5f9390bd136105f986
Time: 2020-05-28
Author: tobiasr@allenai.org
File Name: allennlp/nn/beam_search.py
Class Name: BeamSearch
Method Name: search


Project Name: streamlit/streamlit
Commit Name: d24989cdda816343f74a97fc32ce3fd1a689a265
Time: 2019-07-16
Author: thiago@streamlit.io
File Name: lib/streamlit/Server.py
Class Name:
Method Name: _is_url_from_allowed_origins


Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox