diff --git a/text_classification/infer.py b/text_classification/infer.py index c507d749caf122ad4ccc68fded277d6adb51872a..0516492456eebd834c183cbee3c51ad9d0021bdb 100644 --- a/text_classification/infer.py +++ b/text_classification/infer.py @@ -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"