69d978ed497856d05730c05564597e604713f5c4,beginner_source/chatbot_tutorial.py,,evaluate,#,1266
Before Change
// Decode sentence
if beam_size == 1:
return decode(decoder, decoder_hidden, encoder_outputs, voc)
else:
return beam_decode(decoder, decoder_hidden, encoder_outputs, voc, beam_size)
After Change
// Decode sentence with searcher
tokens, scores = searcher(input_batch, lengths, max_length)
// indexes -> words
decoded_words = [voc.index2word[token.item()] for token in tokens]
return decoded_words
def evaluateInput(encoder, decoder, searcher, voc):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: pytorch/tutorials
Commit Name: 69d978ed497856d05730c05564597e604713f5c4
Time: 2018-09-16
Author: minkawhich@fb.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluate
Project Name: pytorch/tutorials
Commit Name: a61996ae5406ddfee4ac65ab647ebe858fc16260
Time: 2018-09-17
Author: matthewinkawhich@gmail.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluate
Project Name: NVIDIA/sentiment-discovery
Commit Name: 808bf695342332c35843a99d7f2a3295315e6c9d
Time: 2018-10-30
Author: raulp@nvidia.com
File Name: data_utils/preprocess.py
Class Name:
Method Name: process_str