Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
9682b2e4
F
FluidDoc
项目概览
PaddlePaddle
/
FluidDoc
通知
10
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
23
列表
看板
标记
里程碑
合并请求
111
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FluidDoc
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
23
Issue
23
列表
看板
标记
里程碑
合并请求
111
合并请求
111
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9682b2e4
编写于
2月 15, 2019
作者:
C
chengduo
提交者:
GitHub
2月 15, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #622 from chengduoZH/remove_V2
Remove paddle.v2
上级
0faa5692
8519078c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
16 addition
and
75 deletion
+16
-75
doc/fluid/api/CMakeLists.txt
doc/fluid/api/CMakeLists.txt
+0
-1
doc/fluid/api/data/data_reader.rst
doc/fluid/api/data/data_reader.rst
+1
-51
doc/fluid/api/data/image.rst
doc/fluid/api/data/image.rst
+1
-1
doc/fluid/api_cn/layers_cn.rst
doc/fluid/api_cn/layers_cn.rst
+4
-4
doc/fluid/design/others/gan_api.md
doc/fluid/design/others/gan_api.md
+1
-1
doc/fluid/getstarted/Developer's_Guide_to_Paddle_Fluid.md
doc/fluid/getstarted/Developer's_Guide_to_Paddle_Fluid.md
+1
-6
doc/fluid/howto/cluster/fluid_cluster_train_cn.md
doc/fluid/howto/cluster/fluid_cluster_train_cn.md
+1
-1
doc/fluid/howto/cluster/fluid_cluster_train_en.md
doc/fluid/howto/cluster/fluid_cluster_train_en.md
+1
-1
doc/fluid/user_guides/howto/basic_concept/fluid_basic_concept.rst
...d/user_guides/howto/basic_concept/fluid_basic_concept.rst
+2
-5
doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst
doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst
+2
-2
doc/fluid/user_guides/howto/prepare_data/use_py_reader_en.rst
...fluid/user_guides/howto/prepare_data/use_py_reader_en.rst
+2
-2
未找到文件。
doc/fluid/api/CMakeLists.txt
浏览文件 @
9682b2e4
...
@@ -8,7 +8,6 @@ set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
...
@@ -8,7 +8,6 @@ set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
set
(
SPHINX_HTML_DIR_EN
"
${
CMAKE_CURRENT_BINARY_DIR
}
/en/html"
)
set
(
SPHINX_HTML_DIR_EN
"
${
CMAKE_CURRENT_BINARY_DIR
}
/en/html"
)
set
(
IMPORT_PADDLE_STRING
"import paddle"
)
set
(
IMPORT_PADDLE_STRING
"import paddle"
)
set
(
IMPORT_PADDLEV2_STRING
"import paddle.v2"
)
configure_file
(
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../templates/conf.py.en.in"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../templates/conf.py.en.in"
...
...
doc/fluid/api/data/data_reader.rst
浏览文件 @
9682b2e4
...
@@ -2,54 +2,10 @@
...
@@ -2,54 +2,10 @@
Data Reader
Data Reader
=====================
=====================
DataTypes
=========
.. autofunction:: paddle.v2.data_type.dense_array
:noindex:
.. autofunction:: paddle.v2.data_type.integer_value
:noindex:
.. autofunction:: paddle.v2.data_type.integer_value_sequence
:noindex:
.. autofunction:: paddle.v2.data_type.integer_value_sub_sequence
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_binary_vector
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_binary_vector_sequence
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_binary_vector_sub_sequence
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_float_vector
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_float_vector_sequence
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_float_vector_sub_sequence
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_non_value_slot
:noindex:
.. autofunction:: paddle.v2.data_type.sparse_value_slot
:noindex:
.. autoclass:: paddle.v2.data_type.InputType
:members:
:noindex:
DataFeeder
DataFeeder
==========
==========
.. automodule:: paddle.
v2
.data_feeder
.. automodule:: paddle.
fluid
.data_feeder
:members:
:members:
:noindex:
:noindex:
...
@@ -64,9 +20,3 @@ Reader
...
@@ -64,9 +20,3 @@ Reader
:members:
:members:
:noindex:
:noindex:
minibatch
=========
.. automodule:: paddle.v2.minibatch
:members:
:noindex:
doc/fluid/api/data/image.rst
浏览文件 @
9682b2e4
Image Interface
Image Interface
===============
===============
.. automodule:: paddle.
v2.
image
.. automodule:: paddle.image
:members:
:members:
doc/fluid/api_cn/layers_cn.rst
浏览文件 @
9682b2e4
...
@@ -1063,7 +1063,7 @@ py_reader
...
@@ -1063,7 +1063,7 @@ py_reader
.. code-block:: python
.. code-block:: python
import paddle
.v2
import paddle
import paddle.fluid as fluid
import paddle.fluid as fluid
import paddle.dataset.mnist as mnist
import paddle.dataset.mnist as mnist
...
@@ -1071,7 +1071,7 @@ py_reader
...
@@ -1071,7 +1071,7 @@ py_reader
shapes=[(-1,3,224,224), (-1,1)],
shapes=[(-1,3,224,224), (-1,1)],
dtypes=['float32', 'int64'])
dtypes=['float32', 'int64'])
reader.decorate_paddle_reader(
reader.decorate_paddle_reader(
paddle.
v2.
reader.shuffle(paddle.batch(mnist.train())
paddle.reader.shuffle(paddle.batch(mnist.train())
img, label = fluid.layers.read_file(reader)
img, label = fluid.layers.read_file(reader)
loss = network(img, label) # 一些网络定义
loss = network(img, label) # 一些网络定义
...
@@ -1095,7 +1095,7 @@ py_reader
...
@@ -1095,7 +1095,7 @@ py_reader
.. code-block:: python
.. code-block:: python
import paddle
.v2
import paddle
import paddle.fluid as fluid
import paddle.fluid as fluid
import paddle.dataset.mnist as mnist
import paddle.dataset.mnist as mnist
...
@@ -1109,7 +1109,7 @@ py_reader
...
@@ -1109,7 +1109,7 @@ py_reader
dtypes=['float32', 'int64'],
dtypes=['float32', 'int64'],
name='train_reader')
name='train_reader')
train_reader.decorate_paddle_reader(
train_reader.decorate_paddle_reader(
paddle.
v2.
reader.shuffle(paddle.batch(mnist.train())
paddle.reader.shuffle(paddle.batch(mnist.train())
test_reader = fluid.layers.py_reader(capacity=32,
test_reader = fluid.layers.py_reader(capacity=32,
shapes=[(-1,3,224,224), (-1,1)],
shapes=[(-1,3,224,224), (-1,1)],
...
...
doc/fluid/design/others/gan_api.md
浏览文件 @
9682b2e4
...
@@ -201,7 +201,7 @@ Generally, the user of GAN just need to the following things:
...
@@ -201,7 +201,7 @@ Generally, the user of GAN just need to the following things:
-
Specify two optimizers for two different losses with respect to different parameters.
-
Specify two optimizers for two different losses with respect to different parameters.
```
python
```
python
# pd for short, should be more concise.
# pd for short, should be more concise.
from
paddle
.
v2
as
pd
import
paddle
as
pd
import
numpy
as
np
import
numpy
as
np
import
logging
import
logging
...
...
doc/fluid/getstarted/Developer's_Guide_to_Paddle_Fluid.md
浏览文件 @
9682b2e4
...
@@ -365,11 +365,6 @@
...
@@ -365,11 +365,6 @@
-
`default_startup_program`
:创建可学习参数,对参数进行初始化
-
`default_startup_program`
:创建可学习参数,对参数进行初始化
-
`default_main_program`
:由用户定义的模型,包括了前向、反向、优化及所有必要的计算
-
`default_main_program`
:由用户定义的模型,包括了前向、反向、优化及所有必要的计算
-
打印可读的
`Program`
```
python
from
paddle.v2.fluid
import
debuger
print
debuger
.
pprint_program_codes
(
framework
.
default_main_program
().
desc
)
```
</font>
</font>
---
---
...
@@ -1626,7 +1621,7 @@ class ClipKernel : public framework::OpKernel<T> {
...
@@ -1626,7 +1621,7 @@ class ClipKernel : public framework::OpKernel<T> {
-
当在python端执行时:
-
当在python端执行时:
```
python
```
python
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
```
```
[
`framework.py`
](
https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/framework.py#L1040
)
定义了两个全局
`Program`
:
[
`framework.py`
](
https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/framework.py#L1040
)
定义了两个全局
`Program`
:
```
python
```
python
...
...
doc/fluid/howto/cluster/fluid_cluster_train_cn.md
浏览文件 @
9682b2e4
...
@@ -19,7 +19,7 @@ cmake .. -DWITH_DOC=OFF -DWITH_GPU=OFF -DWITH_DISTRIBUTE=ON -DWITH_SWIG_PY=ON -D
...
@@ -19,7 +19,7 @@ cmake .. -DWITH_DOC=OFF -DWITH_GPU=OFF -DWITH_DISTRIBUTE=ON -DWITH_SWIG_PY=ON -D
这里,我们以
[
Deep Learing 101
](
http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.html
)
课程中的第一章 fit a line 为例,描述如何将单机训练脚本改造成支持集群训练的版本。
这里,我们以
[
Deep Learing 101
](
http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.html
)
课程中的第一章 fit a line 为例,描述如何将单机训练脚本改造成支持集群训练的版本。
### 单机训练脚本示例
### 单机训练脚本示例
```
python
```
python
import
paddle
.v2
as
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
[
13
],
dtype
=
'float32'
)
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
[
13
],
dtype
=
'float32'
)
...
...
doc/fluid/howto/cluster/fluid_cluster_train_en.md
浏览文件 @
9682b2e4
...
@@ -31,7 +31,7 @@ Let's take [Deep Learning 101](http://www.paddlepaddle.org/docs/develop/book/01.
...
@@ -31,7 +31,7 @@ Let's take [Deep Learning 101](http://www.paddlepaddle.org/docs/develop/book/01.
The non-cluster version of this demo with fluid API is as follows:
The non-cluster version of this demo with fluid API is as follows:
```
python
```
python
import
paddle
.v2
as
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
[
13
],
dtype
=
'float32'
)
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
[
13
],
dtype
=
'float32'
)
...
...
doc/fluid/user_guides/howto/basic_concept/fluid_basic_concept.rst
浏览文件 @
9682b2e4
...
@@ -251,9 +251,8 @@ PaddleFluid 中以 :code:`fluid.layers.data` 来接收输入数据。
...
@@ -251,9 +251,8 @@ PaddleFluid 中以 :code:`fluid.layers.data` 来接收输入数据。
::
::
import numpy as np
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid as fluid
import paddle.v2 as paddle
# define the input layers for the network.
# define the input layers for the network.
x = fluid.layers.data(name="img", shape=[1, 28, 28], dtype="float32")
x = fluid.layers.data(name="img", shape=[1, 28, 28], dtype="float32")
...
@@ -350,10 +349,8 @@ Fluid 使用 Program 而不是计算图描述模型,一般情况下,用户
...
@@ -350,10 +349,8 @@ Fluid 使用 Program 而不是计算图描述模型,一般情况下,用户
::
::
import numpy as np
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid as fluid
import paddle.v2 as paddle
def main():
def main():
BATCH_SIZE = 128
BATCH_SIZE = 128
...
...
doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst
浏览文件 @
9682b2e4
...
@@ -49,9 +49,9 @@ PyReader对象。
...
@@ -49,9 +49,9 @@ PyReader对象。
.. code-block:: python
.. code-block:: python
import paddle
import paddle.fluid as fluid
import paddle.fluid as fluid
import paddle.dataset.mnist as mnist
import paddle.dataset.mnist as mnist
import paddle.v2
import numpy
import numpy
...
@@ -109,7 +109,7 @@ PyReader对象提供 :code:`decorate_tensor_provider` 和 :code:`decorate_paddle
...
@@ -109,7 +109,7 @@ PyReader对象提供 :code:`decorate_tensor_provider` 和 :code:`decorate_paddle
use_cuda=True, share_vars_from=trainer, main_program=test_prog)
use_cuda=True, share_vars_from=trainer, main_program=test_prog)
train_reader.decorate_paddle_reader(
train_reader.decorate_paddle_reader(
paddle.
v2.
reader.shuffle(paddle.batch(mnist.train(), 512), buf_size=8192))
paddle.reader.shuffle(paddle.batch(mnist.train(), 512), buf_size=8192))
test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512))
test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512))
...
...
doc/fluid/user_guides/howto/prepare_data/use_py_reader_en.rst
浏览文件 @
9682b2e4
...
@@ -54,9 +54,9 @@ Details are as follows:
...
@@ -54,9 +54,9 @@ Details are as follows:
.. code-block:: python
.. code-block:: python
import paddle
import paddle.fluid as fluid
import paddle.fluid as fluid
import paddle.dataset.mnist as mnist
import paddle.dataset.mnist as mnist
import paddle.v2
import numpy
import numpy
...
@@ -115,7 +115,7 @@ Details are as follows(the remaining part of the code above):
...
@@ -115,7 +115,7 @@ Details are as follows(the remaining part of the code above):
use_cuda=True, share_vars_from=trainer, main_program=test_prog)
use_cuda=True, share_vars_from=trainer, main_program=test_prog)
train_reader.decorate_paddle_reader(
train_reader.decorate_paddle_reader(
paddle.
v2.
reader.shuffle(paddle.batch(mnist.train(), 512), buf_size=8192))
paddle.reader.shuffle(paddle.batch(mnist.train(), 512), buf_size=8192))
test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512))
test_reader.decorate_paddle_reader(paddle.batch(mnist.test(), 512))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录