Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
95de28df
F
FluidDoc
项目概览
PaddlePaddle
/
FluidDoc
通知
5
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看板
未验证
提交
95de28df
编写于
5月 12, 2020
作者:
C
ceci3
提交者:
GitHub
5月 12, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sync to 1.8 (#2088)
上级
211dac1b
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
54 addition
and
57 deletion
+54
-57
doc/fluid/user_guides/cv_case/gan/README.cn.md
doc/fluid/user_guides/cv_case/gan/README.cn.md
+2
-2
doc/fluid/user_guides/cv_case/gan/README.md
doc/fluid/user_guides/cv_case/gan/README.md
+2
-2
doc/fluid/user_guides/cv_case/gan/dc_gan.py
doc/fluid/user_guides/cv_case/gan/dc_gan.py
+3
-4
doc/fluid/user_guides/cv_case/gan/index.cn.html
doc/fluid/user_guides/cv_case/gan/index.cn.html
+2
-2
doc/fluid/user_guides/cv_case/gan/index.html
doc/fluid/user_guides/cv_case/gan/index.html
+2
-2
doc/fluid/user_guides/simple_case/fit_a_line/README.cn.md
doc/fluid/user_guides/simple_case/fit_a_line/README.cn.md
+9
-9
doc/fluid/user_guides/simple_case/fit_a_line/README.md
doc/fluid/user_guides/simple_case/fit_a_line/README.md
+9
-9
doc/fluid/user_guides/simple_case/fit_a_line/index.cn.html
doc/fluid/user_guides/simple_case/fit_a_line/index.cn.html
+9
-9
doc/fluid/user_guides/simple_case/fit_a_line/index.html
doc/fluid/user_guides/simple_case/fit_a_line/index.html
+9
-9
doc/fluid/user_guides/simple_case/fit_a_line/train.py
doc/fluid/user_guides/simple_case/fit_a_line/train.py
+7
-9
未找到文件。
doc/fluid/user_guides/cv_case/gan/README.cn.md
浏览文件 @
95de28df
...
...
@@ -312,8 +312,8 @@ batch是一个特殊的decorator,它的输入是一个reader,输出是一个
```
python
batch_size
=
128
# Minibatch size
train_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
train_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
mnist
.
train
(),
buf_size
=
60000
),
batch_size
=
batch_size
)
```
...
...
doc/fluid/user_guides/cv_case/gan/README.md
浏览文件 @
95de28df
...
...
@@ -311,8 +311,8 @@ Batch is a special decorator. Its input is a reader and its output is a batched
```
python
batch_size
=
128
# Minibatch size
train_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
train_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
mnist
.
train
(),
buf_size
=
60000
),
batch_size
=
batch_size
)
```
...
...
doc/fluid/user_guides/cv_case/gan/dc_gan.py
浏览文件 @
95de28df
...
...
@@ -93,13 +93,12 @@ def train(args):
exe
=
fluid
.
Executor
(
fluid
.
CUDAPlace
(
0
))
exe
.
run
(
fluid
.
default_startup_program
())
if
args
.
enable_ce
:
train_reader
=
paddle
.
batch
(
train_reader
=
fluid
.
io
.
batch
(
paddle
.
dataset
.
mnist
.
train
(),
batch_size
=
args
.
batch_size
)
else
:
train_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
paddle
.
dataset
.
mnist
.
train
(),
buf_size
=
60000
),
train_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
mnist
.
train
(),
buf_size
=
60000
),
batch_size
=
args
.
batch_size
)
NUM_TRAIN_TIMES_OF_DG
=
2
...
...
doc/fluid/user_guides/cv_case/gan/index.cn.html
浏览文件 @
95de28df
...
...
@@ -354,8 +354,8 @@ batch是一个特殊的decorator,它的输入是一个reader,输出是一个
```python
batch_size = 128 # Minibatch size
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
paddle.dataset.mnist.train(), buf_size=60000),
batch_size=batch_size)
```
...
...
doc/fluid/user_guides/cv_case/gan/index.html
浏览文件 @
95de28df
...
...
@@ -353,8 +353,8 @@ Batch is a special decorator. Its input is a reader and its output is a batched
```python
batch_size = 128 # Minibatch size
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
paddle.dataset.mnist.train(), buf_size=60000),
batch_size=batch_size)
```
...
...
doc/fluid/user_guides/simple_case/fit_a_line/README.cn.md
浏览文件 @
95de28df
...
...
@@ -143,13 +143,13 @@ import sys
```
python
BATCH_SIZE
=
20
train_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
train_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
train
(),
buf_size
=
500
),
batch_size
=
BATCH_SIZE
)
test_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
test_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
test
(),
buf_size
=
500
),
batch_size
=
BATCH_SIZE
)
```
...
...
@@ -179,13 +179,13 @@ def reader_creator(train_data):
yield d[:-1], d[-1:]
return reader
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(train_data), buf_size=500),
batch_size=BATCH_SIZE)
test_reader =
paddle
.batch(
paddle.reader
.shuffle(
test_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(test_data), buf_size=500),
batch_size=BATCH_SIZE)
```
...
...
@@ -349,7 +349,7 @@ with fluid.scope_guard(inference_scope):
fetch_targets
]
=
fluid
.
io
.
load_inference_model
(
params_dirname
,
infer_exe
)
# 载入预训练模型
batch_size
=
10
infer_reader
=
paddle
.
batch
(
infer_reader
=
fluid
.
io
.
batch
(
paddle
.
dataset
.
uci_housing
.
test
(),
batch_size
=
batch_size
)
# 准备测试集
infer_data
=
next
(
infer_reader
())
...
...
doc/fluid/user_guides/simple_case/fit_a_line/README.md
浏览文件 @
95de28df
...
...
@@ -145,13 +145,13 @@ Next we define the data feeder for training. The data feeder reads a batch of da
```
python
BATCH_SIZE
=
20
train_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
train_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
train
(),
buf_size
=
500
),
batch_size
=
BATCH_SIZE
)
test_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
test_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
test
(),
buf_size
=
500
),
batch_size
=
BATCH_SIZE
)
```
...
...
@@ -181,13 +181,13 @@ def reader_creator(train_data):
yield d[:-1], d[-1:]
return reader
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(train_data), buf_size=500),
batch_size=BATCH_SIZE)
test_reader =
paddle
.batch(
paddle.reader
.shuffle(
test_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(test_data), buf_size=500),
batch_size=BATCH_SIZE)
```
...
...
@@ -351,7 +351,7 @@ with fluid.scope_guard(inference_scope):
fetch_targets
]
=
fluid
.
io
.
load_inference_model
(
params_dirname
,
infer_exe
)
# load pre-predict model
batch_size
=
10
infer_reader
=
paddle
.
batch
(
infer_reader
=
fluid
.
io
.
batch
(
paddle
.
dataset
.
uci_housing
.
test
(),
batch_size
=
batch_size
)
# prepare test dataset
infer_data
=
next
(
infer_reader
())
...
...
doc/fluid/user_guides/simple_case/fit_a_line/index.cn.html
浏览文件 @
95de28df
...
...
@@ -185,13 +185,13 @@ import sys
```python
BATCH_SIZE = 20
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
paddle.dataset.uci_housing.train(), buf_size=500),
batch_size=BATCH_SIZE)
test_reader =
paddle
.batch(
paddle.reader
.shuffle(
test_reader =
fluid.io
.batch(
fluid.io
.shuffle(
paddle.dataset.uci_housing.test(), buf_size=500),
batch_size=BATCH_SIZE)
```
...
...
@@ -221,13 +221,13 @@ def reader_creator(train_data):
yield d[:-1], d[-1:]
return reader
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(train_data), buf_size=500),
batch_size=BATCH_SIZE)
test_reader =
paddle
.batch(
paddle.reader
.shuffle(
test_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(test_data), buf_size=500),
batch_size=BATCH_SIZE)
```
...
...
@@ -391,7 +391,7 @@ with fluid.scope_guard(inference_scope):
fetch_targets] =
fluid.io.load_inference_model(params_dirname,
infer_exe
)
#
载入预训练模型
batch_size =
10
infer_reader =
paddle
.batch(
infer_reader =
fluid.io
.batch(
paddle.dataset.uci_housing.test
(),
batch_size=
batch_size)
#
准备测试集
infer_data =
next(infer_reader())
...
...
doc/fluid/user_guides/simple_case/fit_a_line/index.html
浏览文件 @
95de28df
...
...
@@ -187,13 +187,13 @@ Next we define the data feeder for training. The data feeder reads a batch of da
```python
BATCH_SIZE = 20
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
paddle.dataset.uci_housing.train(), buf_size=500),
batch_size=BATCH_SIZE)
test_reader =
paddle
.batch(
paddle.reader
.shuffle(
test_reader =
fluid.io
.batch(
fluid.io
.shuffle(
paddle.dataset.uci_housing.test(), buf_size=500),
batch_size=BATCH_SIZE)
```
...
...
@@ -223,13 +223,13 @@ def reader_creator(train_data):
yield d[:-1], d[-1:]
return reader
train_reader =
paddle
.batch(
paddle.reader
.shuffle(
train_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(train_data), buf_size=500),
batch_size=BATCH_SIZE)
test_reader =
paddle
.batch(
paddle.reader
.shuffle(
test_reader =
fluid.io
.batch(
fluid.io
.shuffle(
reader_creator(test_data), buf_size=500),
batch_size=BATCH_SIZE)
```
...
...
@@ -393,7 +393,7 @@ with fluid.scope_guard(inference_scope):
fetch_targets] =
fluid.io.load_inference_model(params_dirname,
infer_exe
)
#
load
pre-predict
model
batch_size =
10
infer_reader =
paddle
.batch(
infer_reader =
fluid.io
.batch(
paddle.dataset.uci_housing.test
(),
batch_size=
batch_size)
#
prepare
test
dataset
infer_data =
next(infer_reader())
...
...
doc/fluid/user_guides/simple_case/fit_a_line/train.py
浏览文件 @
95de28df
...
...
@@ -74,18 +74,16 @@ def main():
batch_size
=
20
if
args
.
enable_ce
:
train_reader
=
paddle
.
batch
(
train_reader
=
fluid
.
io
.
batch
(
paddle
.
dataset
.
uci_housing
.
train
(),
batch_size
=
batch_size
)
test_reader
=
paddle
.
batch
(
test_reader
=
fluid
.
io
.
batch
(
paddle
.
dataset
.
uci_housing
.
test
(),
batch_size
=
batch_size
)
else
:
train_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
train
(),
buf_size
=
500
),
train_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
train
(),
buf_size
=
500
),
batch_size
=
batch_size
)
test_reader
=
paddle
.
batch
(
paddle
.
reader
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
test
(),
buf_size
=
500
),
test_reader
=
fluid
.
io
.
batch
(
fluid
.
io
.
shuffle
(
paddle
.
dataset
.
uci_housing
.
test
(),
buf_size
=
500
),
batch_size
=
batch_size
)
# feature vector of length 13
...
...
@@ -172,7 +170,7 @@ def main():
]
=
fluid
.
io
.
load_inference_model
(
params_dirname
,
infer_exe
)
batch_size
=
10
infer_reader
=
paddle
.
batch
(
infer_reader
=
fluid
.
io
.
batch
(
paddle
.
dataset
.
uci_housing
.
test
(),
batch_size
=
batch_size
)
infer_data
=
next
(
infer_reader
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录