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
        //       (in particular in case of SRU) it was not raising error in 0.3

After Change


        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:
            self.state["coverage"] = attns["coverage"][-1].unsqueeze(0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

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: uber/ludwig
Commit Name: 2c76a23d68e9ccdd40849a1e0c8597151d4ccc72
Time: 2020-03-27
Author: w4nderlust@gmail.com
File Name: ludwig/features/base_feature.py
Class Name: OutputFeature
Method Name: update_metrics


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


Project Name: uber/ludwig
Commit Name: 70d0fe1729a5e8e2d4f5bf06447c5333b82d5c56
Time: 2020-03-25
Author: jimthompson5802@aol.com
File Name: ludwig/features/binary_feature.py
Class Name: BinaryOutputFeature
Method Name: update_metrics