93930abf795db0300aebab280154acaf0f6162ae,onmt/trainer.py,Trainer,validate,#Trainer#Any#,209

Before Change



            for batch in valid_iter:
                src, src_lengths = inputters.make_features(batch, "src")
                tgt, _ = inputters.make_features(batch, "tgt")

                // F-prop through the model.
                outputs, attns = self.model(src, tgt, src_lengths)

After Change


            stats = onmt.utils.Statistics()

            for batch in valid_iter:
                src, src_lengths = batch.src if isinstance(batch.src, tuple) \
                                   else (batch.src, None)
                tgt = batch.tgt

                // F-prop through the model.
                outputs, attns = self.model(src, tgt, src_lengths)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 93930abf795db0300aebab280154acaf0f6162ae
Time: 2019-01-25
Author: dylan.flaute@gmail.com
File Name: onmt/trainer.py
Class Name: Trainer
Method Name: validate


Project Name: OpenNMT/OpenNMT-py
Commit Name: 93930abf795db0300aebab280154acaf0f6162ae
Time: 2019-01-25
Author: dylan.flaute@gmail.com
File Name: onmt/trainer.py
Class Name: Trainer
Method Name: _gradient_accumulation


Project Name: OpenNMT/OpenNMT-py
Commit Name: 93930abf795db0300aebab280154acaf0f6162ae
Time: 2019-01-25
Author: dylan.flaute@gmail.com
File Name: onmt/translate/translator.py
Class Name: Translator
Method Name: _run_encoder