Skip to content

Conversation

@sneaxiy
Copy link
Collaborator

@sneaxiy sneaxiy commented Nov 10, 2018

Fix #296
image

@shanyi15 shanyi15 added the API Guide docs related to API Guide label Nov 10, 2018
Copy link
Collaborator

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这篇是否应该和数据输入输出放在一块?
另外,报个错,上述链接中下图跳转失败。
image

place = fluid.CUDAPlace(0) if fluid.core.is_compiled_with_cuda() else fluid.CPUPlace()
feeder = fluid.DataFeeder(feed_list=[image, label], place=place)

其中,:code:`feed_list` 参数为变量列表,这些变量往往由 :code:`fluid.layers.data()` 创建,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些变量往往由,“往往”的意思是还有别的创建方式?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix.

feeder = fluid.DataFeeder(feed_list=[image, label], place=place)

其中,:code:`feed_list` 参数为变量列表,这些变量往往由 :code:`fluid.layers.data()` 创建,
:code:`place` 参数表示应将Python端传入的numpy array等数据转换为GPU端的 :code:`LoDTensor`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

转换为GPU端或是CPU端的:code:LoDTensor

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix.

会完成数据类型和维度的转换。若 :code:`feed_list` 中的变量的 :code:`lod_level` 不为零,则Fluid会将经维度转换后的
:code:`iterable` 中每行数据的第0维作为返回结果的 :code:`LoD`。

具体使用方法请参见 :ref:`api_fluid_DataFeeder` 。 No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:ref:api_fluid_DataFeeder 应该是可以调整链接了,但从预览截图里没有显示。

Copy link
Contributor

@shanyi15 shanyi15 Nov 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可能是因为在预览的时候没有加到API的树下,导致内链失败,@tink2123 在电脑上尝试,是可以的

则可传入Python int、float等类型数据。:code:`image_i` 与 :code:`label_i` 的数据类型和维度不必
与 :code:`fluid.layers.data()` 创建时指定的 :code:`dtype` 和 :code:`shape` 完全一致,:code:`DataFeeder` 内部
会完成数据类型和维度的转换。若 :code:`feed_list` 中的变量的 :code:`lod_level` 不为零,则Fluid会将经维度转换后的
:code:`iterable` 中每行数据的第0维作为返回结果的 :code:`LoD`。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

经维度转换后-》经过维度转换后?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix.

@sneaxiy sneaxiy force-pushed the data_feeder_api_guide_1.2 branch from 5ccb7e7 to 358a3ff Compare November 21, 2018 11:00
Copy link
Contributor

@shanyi15 shanyi15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@shanyi15 shanyi15 merged commit d0dcfe8 into PaddlePaddle:develop Nov 23, 2018
RichardWooSJTU pushed a commit to RichardWooSJTU/docs that referenced this pull request Apr 8, 2022
* [cherry-pick] Fix v0.2 docs (PaddlePaddle#258)

* fix save checkpoint in quantization (PaddlePaddle#257)

* fix save checkpoint in quantization
* fix details

* Fix softlink (PaddlePaddle#256)

Co-authored-by: Liufang Sang <[email protected]>

* [cherry-pick] add prune benchmark (PaddlePaddle#262)

* add prune model latency (PaddlePaddle#260) & fix run command for windows (PaddlePaddle#261)

* Cherry-pick update reader config (PaddlePaddle#269)

* Force `cudnn` backend for depthwise convs when fp16 is enabled (PaddlePaddle#271)

* fix weights path (PaddlePaddle#274)

* cherry-pick refine fruit config (PaddlePaddle#289)

* cherry-pick polish doc (PaddlePaddle#287)

* cherry-pick fix oidv5 link (PaddlePaddle#296)

cherry-pick fix oidv5 link

* [cherry-pick] polish slim model zoo (PaddlePaddle#313)

* polish slim README

* refine pedestrian_yolov3_darknet.yml and vehicle_yolov3_darknet.yml in contrib (PaddlePaddle#324)

* fix yolo configs (PaddlePaddle#332)

* cherry pick polish doc (PaddlePaddle#329)

* refine config (PaddlePaddle#336)

* [cherry pick] refine sensitive link (PaddlePaddle#334)

* refine sensitive link

* add YOLOv3Loss.batch_size comments (PaddlePaddle#348)

* add deploy with python

* update README

* support TRT and Executor

* update cpp_infer for paddle latest

* support fixed shape of model

* polish code

* supoort trt

* support TRT&Executor

* deploy/python : fix coding style problems

* update requirements.txt

* update deploy/python docs

Co-authored-by: Guanghua Yu <[email protected]>
Co-authored-by: Liufang Sang <[email protected]>
Co-authored-by: Kaipeng Deng <[email protected]>
Co-authored-by: wangguanzhong <[email protected]>
Co-authored-by: Yang Zhang <[email protected]>
Co-authored-by: littletomatodonkey <[email protected]>
Co-authored-by: FlyingQianMM <[email protected]>
Co-authored-by: Channingss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Guide docs related to API Guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants