Evaluator¶
evaluator¶
-
class
seq2seq.evaluator.evaluator.
Evaluator
(loss=<seq2seq.loss.loss.NLLLoss object>, batch_size=64)¶ Class to evaluate models with given datasets.
Parameters: - loss (seq2seq.loss, optional) – loss for evaluator (default: seq2seq.loss.NLLLoss)
- batch_size (int, optional) – batch size for evaluator (default: 64)
predictor¶
-
class
seq2seq.evaluator.predictor.
Predictor
(model, src_vocab, tgt_vocab)¶ -
get_decoder_features
(src_seq)¶
-
predict
(src_seq)¶ Make prediction given src_seq as input.
Parameters: src_seq (list) – list of tokens in source language Returns: list of tokens in target language as predicted by the pre-trained model Return type: tgt_seq (list)
-