提交 84775223 编写于 作者: Q qijun

fix bug in infer.py of text classification

上级 dbba2a09
......@@ -28,7 +28,7 @@ def infer(topology, data_dir, model_path, word_dict_path, label_dict_path,
word_reverse_dict = dict((value, key)
for key, value in word_dict.iteritems())
label_reverse_dict = {0: "positive", 1: "negative"}
test_reader = paddle.dataset.imdb.test(word_dict)
test_reader = paddle.dataset.imdb.test(word_dict)()
else:
assert os.path.exists(
word_dict_path), "the word dictionary file does not exist"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册