Skip to content

Commit

Permalink
Merge pull request #477 from wanghaoshuang/fix_text_classification
Browse files Browse the repository at this point in the history
fix data reader error of text classification.
  • Loading branch information
lcy-seso authored Nov 16, 2017
2 parents 950f451 + 10ee066 commit f980143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text_classification/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def train(topology,
word_dict = paddle.dataset.imdb.word_dict()
train_reader = paddle.batch(
paddle.reader.shuffle(
lambda: paddle.dataset.imdb.train(word_dict), buf_size=1000),
lambda: paddle.dataset.imdb.train(word_dict)(), buf_size=1000),
batch_size=100)
test_reader = paddle.batch(
lambda: paddle.dataset.imdb.test(word_dict), batch_size=100)
lambda: paddle.dataset.imdb.test(word_dict)(), batch_size=100)

class_num = 2
else:
Expand Down

0 comments on commit f980143

Please sign in to comment.