From 79b8060e186b61020b387d1e6d96fb5adf5fde84 Mon Sep 17 00:00:00 2001 From: shippingwang Date: Thu, 11 Oct 2018 04:16:48 +0000 Subject: [PATCH] Remove v2 --- .tools/cache_dataset.py | 2 +- 02.recognize_digits/README.cn.md | 2 +- 02.recognize_digits/README.md | 2 +- 02.recognize_digits/index.cn.html | 2 +- 02.recognize_digits/index.html | 2 +- 03.image_classification/README.cn.md | 2 +- 03.image_classification/README.md | 2 +- 03.image_classification/index.cn.html | 2 +- 03.image_classification/index.html | 2 +- 05.recommender_system/README.cn.md | 2 +- 05.recommender_system/README.md | 2 +- 05.recommender_system/index.cn.html | 2 +- 05.recommender_system/index.html | 2 +- serve/main.py | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.tools/cache_dataset.py b/.tools/cache_dataset.py index ae0125c..6df9ad2 100755 --- a/.tools/cache_dataset.py +++ b/.tools/cache_dataset.py @@ -1,5 +1,5 @@ #!/bin/env python -import paddle.v2.dataset as dataset +import paddle.dataset as dataset import nltk #cifar diff --git a/02.recognize_digits/README.cn.md b/02.recognize_digits/README.cn.md index 3f094b3..9999de9 100644 --- a/02.recognize_digits/README.cn.md +++ b/02.recognize_digits/README.cn.md @@ -317,7 +317,7 @@ def event_handler(event): ```python -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/02.recognize_digits/README.md b/02.recognize_digits/README.md index 291e70b..fe08037 100644 --- a/02.recognize_digits/README.md +++ b/02.recognize_digits/README.md @@ -320,7 +320,7 @@ def event_handler(event): ![png](./image/train_and_test.png) ```python -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/02.recognize_digits/index.cn.html b/02.recognize_digits/index.cn.html index ad3211f..cb45df5 100644 --- a/02.recognize_digits/index.cn.html +++ b/02.recognize_digits/index.cn.html @@ -359,7 +359,7 @@ def event_handler(event): ```python -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/02.recognize_digits/index.html b/02.recognize_digits/index.html index 78644b9..33a0295 100644 --- a/02.recognize_digits/index.html +++ b/02.recognize_digits/index.html @@ -362,7 +362,7 @@ def event_handler(event): ![png](./image/train_and_test.png) ```python -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/03.image_classification/README.cn.md b/03.image_classification/README.cn.md index 743459a..2d70bb3 100644 --- a/03.image_classification/README.cn.md +++ b/03.image_classification/README.cn.md @@ -385,7 +385,7 @@ test_reader = paddle.batch( ```python params_dirname = "image_classification_resnet.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/03.image_classification/README.md b/03.image_classification/README.md index 82da321..f721b55 100644 --- a/03.image_classification/README.md +++ b/03.image_classification/README.md @@ -383,7 +383,7 @@ Callback function `event_handler` will be called during training when a pre-defi ```python params_dirname = "image_classification_resnet.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/03.image_classification/index.cn.html b/03.image_classification/index.cn.html index 3661188..a42fba5 100644 --- a/03.image_classification/index.cn.html +++ b/03.image_classification/index.cn.html @@ -427,7 +427,7 @@ test_reader = paddle.batch( ```python params_dirname = "image_classification_resnet.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/03.image_classification/index.html b/03.image_classification/index.html index c79db6c..954b753 100644 --- a/03.image_classification/index.html +++ b/03.image_classification/index.html @@ -425,7 +425,7 @@ Callback function `event_handler` will be called during training when a pre-defi ```python params_dirname = "image_classification_resnet.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter train_title = "Train cost" test_title = "Test cost" diff --git a/05.recommender_system/README.cn.md b/05.recommender_system/README.cn.md index 68379a4..798b2d9 100644 --- a/05.recommender_system/README.cn.md +++ b/05.recommender_system/README.cn.md @@ -431,7 +431,7 @@ feed_order = [ # Specify the directory path to save the parameters params_dirname = "recommender_system.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter test_title = "Test cost" plot_cost = Ploter(test_title) diff --git a/05.recommender_system/README.md b/05.recommender_system/README.md index 4d65487..5dd29ad 100644 --- a/05.recommender_system/README.md +++ b/05.recommender_system/README.md @@ -406,7 +406,7 @@ For example, we can check the cost by `trainer.test` when `EndStepEvent` occurs # Specify the directory path to save the parameters params_dirname = "recommender_system.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter test_title = "Test cost" plot_cost = Ploter(test_title) diff --git a/05.recommender_system/index.cn.html b/05.recommender_system/index.cn.html index 3b16c12..d27818c 100644 --- a/05.recommender_system/index.cn.html +++ b/05.recommender_system/index.cn.html @@ -473,7 +473,7 @@ feed_order = [ # Specify the directory path to save the parameters params_dirname = "recommender_system.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter test_title = "Test cost" plot_cost = Ploter(test_title) diff --git a/05.recommender_system/index.html b/05.recommender_system/index.html index 73d158b..1e543f6 100644 --- a/05.recommender_system/index.html +++ b/05.recommender_system/index.html @@ -448,7 +448,7 @@ For example, we can check the cost by `trainer.test` when `EndStepEvent` occurs # Specify the directory path to save the parameters params_dirname = "recommender_system.inference.model" -from paddle.v2.plot import Ploter +from paddle.utils import Ploter test_title = "Test cost" plot_cost = Ploter(test_title) diff --git a/serve/main.py b/serve/main.py index ee1de93..1f9dbb8 100644 --- a/serve/main.py +++ b/serve/main.py @@ -1,7 +1,7 @@ import os import traceback -import paddle.v2 as paddle +import paddle as paddle from flask import Flask, jsonify, request from flask_cors import CORS from Queue import Queue -- GitLab