2e90375960c8f10072bbf078e571735f846a2e57,onmt/translate/Translator.py,Translator,__init__,#Translator#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,26
Before Change
// for debugging
self.beam_accum = None
if beam_trace:
self.beam_accum = {
"predicted_ids": [],
"beam_parent_ids": [],
"scores": [],
"log_probs": []}
def translate_batch(self, batch, data):
Translate a batch of sentences.
After Change
beam_trace=False,
min_length=0,
stepwise_penalty=False,
block_ngram_repeat=0):
self.model = model
self.fields = fields
self.n_best = n_best
self.max_length = max_length
self.global_scorer = global_scorer
self.copy_attn = copy_attn
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: 2e90375960c8f10072bbf078e571735f846a2e57
Time: 2018-03-27
Author: s.gehrmann@outlook.com
File Name: onmt/translate/Translator.py
Class Name: Translator
Method Name: __init__
Project Name: ncullen93/torchsample
Commit Name: 914192dda940237aaf47130e5511bb929cd776b7
Time: 2017-04-23
Author: ncullen@Nicks-MacBook-Pro.local
File Name: torchsample/utils.py
Class Name:
Method Name: th_gather_nd
Project Name: dnouri/skorch
Commit Name: a7cd7a15a9baf741f2b4fcd32f3d8055827889b5
Time: 2017-08-08
Author: marian.tietz@ottogroup.com
File Name: examples/word_language_model/generate.py
Class Name:
Method Name:
Project Name: ncullen93/torchsample
Commit Name: 6ddf825a4aa1bcf3a35bba8d36bc433fe5ebaa39
Time: 2017-04-24
Author: ncullen@Nicks-MacBook-Pro.local
File Name: torchsample/utils.py
Class Name:
Method Name: th_nearest_interp_3d