From e4f512f8a9d6c98e11b826fd1627af5eb469c8be Mon Sep 17 00:00:00 2001 From: Tao Luo Date: Thu, 14 Feb 2019 21:29:01 +0800 Subject: [PATCH] remove 'import paddle.v2' in read data test=release/1.3 --- benchmark/tensorflow/machine_translation.py | 2 -- benchmark/tensorflow/mnist.py | 1 - benchmark/tensorflow/resnet.py | 1 - benchmark/tensorflow/stacked_dynamic_lstm.py | 2 -- benchmark/tensorflow/vgg.py | 1 - .../fluid/tests/demo/file_reader/convert_data_to_recordio.py | 1 - python/paddle/fluid/tests/demo/pyreader.py | 3 +-- 7 files changed, 1 insertion(+), 10 deletions(-) diff --git a/benchmark/tensorflow/machine_translation.py b/benchmark/tensorflow/machine_translation.py index 8f77dce98..7837669ed 100644 --- a/benchmark/tensorflow/machine_translation.py +++ b/benchmark/tensorflow/machine_translation.py @@ -35,8 +35,6 @@ import os import argparse import time -import paddle.v2 as paddle - parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "--embedding_dim", diff --git a/benchmark/tensorflow/mnist.py b/benchmark/tensorflow/mnist.py index 7140eed6e..03d533fec 100644 --- a/benchmark/tensorflow/mnist.py +++ b/benchmark/tensorflow/mnist.py @@ -21,7 +21,6 @@ import time import numpy as np import tensorflow as tf -import paddle.v2 as paddle DTYPE = tf.float32 diff --git a/benchmark/tensorflow/resnet.py b/benchmark/tensorflow/resnet.py index c432fa8d5..fdb044195 100644 --- a/benchmark/tensorflow/resnet.py +++ b/benchmark/tensorflow/resnet.py @@ -27,7 +27,6 @@ import argparse import time import numpy as np -import paddle.v2 as paddle import tensorflow as tf DTYPE = tf.float32 diff --git a/benchmark/tensorflow/stacked_dynamic_lstm.py b/benchmark/tensorflow/stacked_dynamic_lstm.py index 528503300..1f532dc2f 100644 --- a/benchmark/tensorflow/stacked_dynamic_lstm.py +++ b/benchmark/tensorflow/stacked_dynamic_lstm.py @@ -21,8 +21,6 @@ import argparse import time import tensorflow as tf -import paddle.v2 as paddle - def parse_args(): parser = argparse.ArgumentParser("LSTM model benchmark.") diff --git a/benchmark/tensorflow/vgg.py b/benchmark/tensorflow/vgg.py index fba5ec71a..d32c835bd 100644 --- a/benchmark/tensorflow/vgg.py +++ b/benchmark/tensorflow/vgg.py @@ -13,7 +13,6 @@ # limitations under the License. """VGG16 benchmark in TensorFlow""" import tensorflow as tf -import paddle.v2 as paddle import numpy as np import argparse import time diff --git a/python/paddle/fluid/tests/demo/file_reader/convert_data_to_recordio.py b/python/paddle/fluid/tests/demo/file_reader/convert_data_to_recordio.py index 45a104ec9..b00af91a9 100644 --- a/python/paddle/fluid/tests/demo/file_reader/convert_data_to_recordio.py +++ b/python/paddle/fluid/tests/demo/file_reader/convert_data_to_recordio.py @@ -16,7 +16,6 @@ from __future__ import print_function import sys import paddle.fluid as fluid -import paddle.v2 as paddle def load_vocab(filename): diff --git a/python/paddle/fluid/tests/demo/pyreader.py b/python/paddle/fluid/tests/demo/pyreader.py index ec61e0eba..bbcef4c3f 100644 --- a/python/paddle/fluid/tests/demo/pyreader.py +++ b/python/paddle/fluid/tests/demo/pyreader.py @@ -20,7 +20,6 @@ import six import paddle import paddle.dataset.mnist as mnist import paddle.fluid as fluid -import paddle.v2 def network(is_train): @@ -72,7 +71,7 @@ def main(): use_cuda=use_cuda, share_vars_from=trainer, main_program=test_prog) train_reader.decorate_paddle_reader( - paddle.v2.reader.shuffle( + paddle.reader.shuffle( paddle.batch(mnist.train(), 512), buf_size=8192)) test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512)) -- GitLab