diff --git a/demo/mnist/api_train_v2.py b/demo/mnist/api_train_v2.py index c9fd7c72df879400c3a6ae007075ac300e8b6c15..1c2c831bec18ef4215338949f96c3357dd8335c9 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 8ba11ca5ec7943032ba5dbd5de48b1be38786010..653c91aacde6618389069d571c3d8a23b88c5f50 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():