5bbd148e6ea1fc2d62c9503fe14bd795fea40389,fairseq/data/backtranslation_dataset.py,BacktranslationDataset,_generate_hypotheses,#BacktranslationDataset#Any#,159

Before Change


        sample["net_input"]["src_tokens"] is really in tgt language.
        
        if torch.cuda.is_available():
            s = utils.move_to_cuda(sample)
        else:
            s = sample
        self.backtranslation_generator.cuda()
        input = s["net_input"]

After Change


        sample. Note in this case, sample["target"] is None, and
        sample["net_input"]["src_tokens"] is really in tgt language.
        
        s = utils.move_to_cuda(sample) if self.cuda else sample
        input = s["net_input"]
        srclen = input["src_tokens"].size(1)
        hypos = self.backtranslation_generator.generate(
            input,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: pytorch/fairseq
Commit Name: 5bbd148e6ea1fc2d62c9503fe14bd795fea40389
Time: 2018-11-01
Author: myleott@fb.com
File Name: fairseq/data/backtranslation_dataset.py
Class Name: BacktranslationDataset
Method Name: _generate_hypotheses


Project Name: elbayadm/attn2d
Commit Name: 7633129ba8d5f0e28bd6b6d6027b14352482ef31
Time: 2019-01-04
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: _prepare_sample