78351302b0761178581d92612b528f6eea529618,onmt/modules/copy_generator.py,CopyGeneratorLossCompute,_make_shard_state,#CopyGeneratorLossCompute#Any#Any#Any#Any#,187

Before Change



        return {
            "output": output,
            "target": batch.tgt[range_[0] + 1: range_[1], :, 0],
            "copy_attn": attns.get("copy"),
            "align": batch.alignment[range_[0] + 1: range_[1]]
        }

After Change


            raise AssertionError("using -copy_attn you need to pass in "
                                 "-dynamic_dict during preprocess stage.")

        shard_state = super(CopyGeneratorLossCompute, self)._make_shard_state(
            batch, output, range_, attns)

        shard_state.update({
            "copy_attn": attns.get("copy"),
            "align": batch.alignment[range_[0] + 1: range_[1]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 78351302b0761178581d92612b528f6eea529618
Time: 2019-06-27
Author: pltrdy@gmail.com
File Name: onmt/modules/copy_generator.py
Class Name: CopyGeneratorLossCompute
Method Name: _make_shard_state


Project Name: williamFalcon/pytorch-lightning
Commit Name: 8e9a026bc34d8409faa572a7144c2d96a7c039ed
Time: 2021-02-11
Author: rohitgr1998@gmail.com
File Name: tests/models/test_hparams.py
Class Name: SimpleNoArgsModel
Method Name: test_step


Project Name: keras-team/keras
Commit Name: 0f6b6eda26f8ccc7c8803fa2b8fab0f43fa4672a
Time: 2021-02-25
Author: scottzhu@google.com
File Name: keras/layers/preprocessing/string_lookup.py
Class Name: StringLookup
Method Name: get_vocabulary