def test(self, test_path):
    test_dataset = lm_tool.get_dataset(test_path)
    if (not hasattr(TEXT, 'vocab')):
        TEXT.vocab = self._word_vocab
    test_score = self._validate(test_dataset)
    logger.info('test score:{}'.format(test_score))
def test(self, test_path):
    test_dataset = lm_tool.get_dataset(test_path)
    if (not hasattr(TEXT, 'vocab')):
        TEXT.vocab = self._word_vocab
    test_score = self._validate(test_dataset)
    logger.info('test score:{}'.format(test_score))