3bb62b0838e580201810095961db156f45368c6e,onmt/decoders/decoder.py,RNNDecoderBase,forward,#RNNDecoderBase#Any#Any#Any#Any#,151

Before Change


        coverage = None
        if "coverage" in attns:
            coverage = attns["coverage"][-1].unsqueeze(0)
        self.update_state(dec_state, output.unsqueeze(0), coverage)

        // Concatenates sequence of tensors along a new dimension.
        // NOTE: v0.3 to 0.4: dec_outs / attns[*] may not be list

After Change


        // Update the state with the result.
        if not isinstance(dec_state, tuple):
            dec_state = (dec_state,)
        self.state["hidden"] = dec_state
        self.state["input_feed"] = dec_outs[-1].unsqueeze(0)
        self.state["coverage"] = None
        if "coverage" in attns:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3bb62b0838e580201810095961db156f45368c6e
Time: 2018-12-08
Author: guillaume.klein@systrangroup.com
File Name: onmt/decoders/decoder.py
Class Name: RNNDecoderBase
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 668c3ef362995c55633fde592354160fec1d1efd
Time: 2019-06-27
Author: dylan.flaute@gmail.com
File Name: onmt/decoders/transformer.py
Class Name: TransformerDecoder
Method Name: forward


Project Name: maciejkula/spotlight
Commit Name: bed4f2dd50ff54eb7629362c3d03a3b758e0745a
Time: 2017-08-09
Author: maciej.kula@gmail.com
File Name: spotlight/layers.py
Class Name: BloomEmbedding
Method Name: forward