Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
01dc38f2
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看板
提交
01dc38f2
编写于
6月 15, 2018
作者:
Y
yuyang18
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add fluid.rst
上级
8169587b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
531 addition
and
2 deletion
+531
-2
source/api_reference/fluid.rst
source/api_reference/fluid.rst
+290
-0
source/api_reference/gen_doc.py
source/api_reference/gen_doc.py
+119
-1
source/api_reference/gen_doc.py
source/api_reference/gen_doc.py
+119
-1
source/api_reference/gen_doc.sh
source/api_reference/gen_doc.sh
+2
-0
source/api_reference/index.rst
source/api_reference/index.rst
+1
-0
未找到文件。
source/api_reference/fluid.rst
0 → 100644
浏览文件 @
01dc38f2
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
=====
fluid
=====
Block
-----
.. autoclass:: paddle.fluid.fluid.Block
:members:
:noindex:
Variable
--------
.. autoclass:: paddle.fluid.fluid.Variable
:members:
:noindex:
Program
-------
.. autoclass:: paddle.fluid.fluid.Program
:members:
:noindex:
Operator
--------
.. autoclass:: paddle.fluid.fluid.Operator
:members:
:noindex:
default_startup_program
-----------------------
.. autofunction:: paddle.fluid.fluid.default_startup_program
:noindex:
default_main_program
--------------------
.. autofunction:: paddle.fluid.fluid.default_main_program
:noindex:
program_guard
-------------
.. autofunction:: paddle.fluid.fluid.program_guard
:noindex:
switch_startup_program
----------------------
.. autofunction:: paddle.fluid.fluid.switch_startup_program
:noindex:
switch_main_program
-------------------
.. autofunction:: paddle.fluid.fluid.switch_main_program
:noindex:
get_var
-------
.. autofunction:: paddle.fluid.fluid.get_var
:noindex:
Executor
--------
.. autoclass:: paddle.fluid.fluid.Executor
:members:
:noindex:
global_scope
------------
.. autofunction:: paddle.fluid.fluid.global_scope
:noindex:
scope_guard
-----------
.. autofunction:: paddle.fluid.fluid.scope_guard
:noindex:
switch_scope
------------
.. autofunction:: paddle.fluid.fluid.switch_scope
:noindex:
fetch_var
---------
.. autofunction:: paddle.fluid.fluid.fetch_var
:noindex:
Go
--
.. autoclass:: paddle.fluid.fluid.Go
:members:
:noindex:
make_channel
------------
.. autofunction:: paddle.fluid.fluid.make_channel
:noindex:
channel_send
------------
.. autofunction:: paddle.fluid.fluid.channel_send
:noindex:
channel_recv
------------
.. autofunction:: paddle.fluid.fluid.channel_recv
:noindex:
channel_close
-------------
.. autofunction:: paddle.fluid.fluid.channel_close
:noindex:
Select
------
.. autoclass:: paddle.fluid.fluid.Select
:members:
:noindex:
Trainer
-------
.. autoclass:: paddle.fluid.fluid.Trainer
:members:
:noindex:
BeginEpochEvent
---------------
.. autoclass:: paddle.fluid.fluid.BeginEpochEvent
:members:
:noindex:
EndEpochEvent
-------------
.. autoclass:: paddle.fluid.fluid.EndEpochEvent
:members:
:noindex:
BeginStepEvent
--------------
.. autoclass:: paddle.fluid.fluid.BeginStepEvent
:members:
:noindex:
EndStepEvent
------------
.. autoclass:: paddle.fluid.fluid.EndStepEvent
:members:
:noindex:
CheckpointConfig
----------------
.. autoclass:: paddle.fluid.fluid.CheckpointConfig
:members:
:noindex:
Inferencer
----------
.. autoclass:: paddle.fluid.fluid.Inferencer
:members:
:noindex:
memory_optimize
---------------
.. autofunction:: paddle.fluid.fluid.memory_optimize
:noindex:
release_memory
--------------
.. autofunction:: paddle.fluid.fluid.release_memory
:noindex:
ParallelExecutor
----------------
.. autoclass:: paddle.fluid.fluid.ParallelExecutor
:members:
:noindex:
ExecutionStrategy
-----------------
.. autoclass:: paddle.fluid.fluid.ExecutionStrategy
:members:
:noindex:
BuildStrategy
-------------
.. autoclass:: paddle.fluid.fluid.BuildStrategy
:members:
:noindex:
create_lod_tensor
-----------------
.. autofunction:: paddle.fluid.fluid.create_lod_tensor
:noindex:
create_random_int_lodtensor
---------------------------
.. autofunction:: paddle.fluid.fluid.create_random_int_lodtensor
:noindex:
LoDTensor
---------
.. autoclass:: paddle.fluid.fluid.LoDTensor
:members:
:noindex:
CPUPlace
--------
.. autoclass:: paddle.fluid.fluid.CPUPlace
:members:
:noindex:
CUDAPlace
---------
.. autoclass:: paddle.fluid.fluid.CUDAPlace
:members:
:noindex:
CUDAPinnedPlace
---------------
.. autoclass:: paddle.fluid.fluid.CUDAPinnedPlace
:members:
:noindex:
Tensor
------
.. autoclass:: paddle.fluid.fluid.Tensor
:members:
:noindex:
ParamAttr
---------
.. autoclass:: paddle.fluid.fluid.ParamAttr
:members:
:noindex:
WeightNormParamAttr
-------------------
.. autoclass:: paddle.fluid.fluid.WeightNormParamAttr
:members:
:noindex:
DataFeeder
----------
.. autoclass:: paddle.fluid.fluid.DataFeeder
:members:
:noindex:
source/api_reference/gen_doc.py
已删除
120000 → 0
浏览文件 @
8169587b
..
/
..
/
paddle
/
doc
/
fluid
/
api
/
gen_doc
.
py
\ No newline at end of file
source/api_reference/gen_doc.py
0 → 100644
浏览文件 @
01dc38f2
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
__future__
import
print_function
import
argparse
import
sys
import
types
import
paddle.fluid
as
fluid
def
parse_arg
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--submodules'
,
nargs
=
"*"
)
parser
.
add_argument
(
'module'
,
type
=
str
,
help
=
'Generate the documentation of which module'
)
return
parser
.
parse_args
()
class
DocGenerator
(
object
):
def
__init__
(
self
,
module_name
=
None
,
stream
=
sys
.
stdout
):
if
module_name
==
""
:
module_name
=
None
self
.
stream
=
stream
if
module_name
is
None
:
self
.
module_name
=
"fluid"
else
:
self
.
module_name
=
module_name
if
module_name
is
None
:
self
.
module
=
fluid
else
:
if
not
hasattr
(
fluid
,
module_name
):
raise
ValueError
(
"Cannot find fluid.{0}"
.
format
(
module_name
))
else
:
self
.
module
=
getattr
(
fluid
,
module_name
)
self
.
stream
.
write
(
'''.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
'''
)
self
.
_print_header_
(
self
.
module_name
,
dot
=
'='
,
is_title
=
True
)
def
print_submodule
(
self
,
submodule_name
):
submodule
=
getattr
(
self
.
module
,
submodule_name
)
if
submodule
is
None
:
raise
ValueError
(
"Cannot find submodule {0}"
.
format
(
submodule_name
))
self
.
print_section
(
submodule_name
)
for
item
in
submodule
.
__all__
:
self
.
print_item
(
item
)
def
print_current_module
(
self
):
for
item
in
self
.
module
.
__all__
:
self
.
print_item
(
item
)
def
print_section
(
self
,
name
):
self
.
_print_header_
(
name
,
dot
=
'='
,
is_title
=
False
)
def
print_item
(
self
,
name
):
item
=
getattr
(
self
.
module
,
name
,
None
)
if
item
is
None
:
return
if
isinstance
(
item
,
types
.
TypeType
):
self
.
print_class
(
name
)
elif
isinstance
(
item
,
types
.
FunctionType
):
self
.
print_method
(
name
)
else
:
pass
def
print_class
(
self
,
name
):
self
.
_print_header_
(
name
,
dot
=
'-'
,
is_title
=
False
)
self
.
stream
.
write
(
'''.. autoclass:: paddle.fluid.{0}.{1}
:members:
:noindex:
'''
.
format
(
self
.
module_name
,
name
))
def
print_method
(
self
,
name
):
self
.
_print_header_
(
name
,
dot
=
'-'
,
is_title
=
False
)
self
.
stream
.
write
(
'''.. autofunction:: paddle.fluid.{0}.{1}
:noindex:
'''
.
format
(
self
.
module_name
,
name
))
def
_print_header_
(
self
,
name
,
dot
,
is_title
):
dot_line
=
dot
*
len
(
name
)
if
is_title
:
self
.
stream
.
write
(
dot_line
)
self
.
stream
.
write
(
'
\n
'
)
self
.
stream
.
write
(
name
)
self
.
stream
.
write
(
'
\n
'
)
self
.
stream
.
write
(
dot_line
)
self
.
stream
.
write
(
'
\n
'
)
self
.
stream
.
write
(
'
\n
'
)
def
main
():
args
=
parse_arg
()
gen
=
DocGenerator
(
args
.
module
)
if
args
.
submodules
is
None
:
gen
.
print_current_module
()
else
:
for
submodule_name
in
args
.
submodules
:
gen
.
print_submodule
(
submodule_name
)
if
__name__
==
'__main__'
:
main
()
source/api_reference/gen_doc.sh
浏览文件 @
01dc38f2
...
@@ -5,3 +5,5 @@ for module in data_feeder clip metrics executor initializer io nets optimizer pa
...
@@ -5,3 +5,5 @@ for module in data_feeder clip metrics executor initializer io nets optimizer pa
do
do
python gen_doc.py
${
module
}
>
${
module
}
.rst
python gen_doc.py
${
module
}
>
${
module
}
.rst
done
done
python gen_doc.py
""
>
fluid.rst
source/api_reference/index.rst
浏览文件 @
01dc38f2
...
@@ -5,6 +5,7 @@ API Reference
...
@@ -5,6 +5,7 @@ API Reference
.. toctree::
.. toctree::
:maxdepth: 1
:maxdepth: 1
fluid.rst
layers.rst
layers.rst
data_feeder.rst
data_feeder.rst
executor.rst
executor.rst
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录