From 01ad3bfdb9daf494967a0789bcad09057c11bdb6 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 28 Feb 2017 13:52:57 +0800 Subject: [PATCH] Fix reader creator in mnist --- demo/mnist/api_train_v2.py | 2 +- python/paddle/v2/dataset/mnist.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/mnist/api_train_v2.py b/demo/mnist/api_train_v2.py index c9fd7c72df8..1c2c831bec1 100644 --- a/demo/mnist/api_train_v2.py +++ b/demo/mnist/api_train_v2.py @@ -33,7 +33,7 @@ def main(): trainer.train( reader=paddle.reader.batched( paddle.reader.shuffle( - paddle.dataset.mnist.train_creator(), buf_size=8192), + paddle.dataset.mnist.train(), buf_size=8192), batch_size=32), cost=cost, parameters=parameters, diff --git a/python/paddle/v2/dataset/mnist.py b/python/paddle/v2/dataset/mnist.py index 8ba11ca5ec7..653c91aacde 100644 --- a/python/paddle/v2/dataset/mnist.py +++ b/python/paddle/v2/dataset/mnist.py @@ -45,7 +45,7 @@ def reader_creator(image_filename, label_filename, buffer_size): m.terminate() l.terminate() - return reader() + return reader def train(): -- GitLab