提交 6b3dccab 编写于 作者: Z Zeng Jinle 提交者: Cheerego

Split nn layers (#892)

* split layers,test=develop

* split nn layers

* remove nn header, test=develop
上级 1a92bbad
...@@ -16,63 +16,48 @@ from __future__ import print_function ...@@ -16,63 +16,48 @@ from __future__ import print_function
import argparse import argparse
import sys import sys
import types import types
import os
import contextlib
import paddle.fluid as fluid import paddle.fluid as fluid
def parse_arg(): def parse_arg():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--submodules', nargs="*") parser.add_argument('--submodules', nargs="*")
parser.add_argument( parser.add_argument(
'--module', type=str, help='Generate the documentation of which module') '--module_name', type=str, help='Generate the documentation of which module')
parser.add_argument( parser.add_argument(
'--module_prefix', type=str, help='Generate the prefix of module') '--module_prefix', type=str, help='Generate the prefix of module')
parser.add_argument(
'--output', type=str, help='Output file or output directory for output rst')
parser.add_argument(
'--to_multiple_files', type=bool, default=False, help='Whether to separate to multiple files')
return parser.parse_args() return parser.parse_args()
def print_item(self, name):
class DocGenerator(object): item = getattr(self.module, name, None)
def __init__(self, module_name=None, module_prefix=None, stream=sys.stdout): if item is None:
if module_name == "": return
module_name = None if isinstance(item, types.TypeType):
self.print_class(name)
if module_prefix == "": elif isinstance(item, types.FunctionType):
module_prefix = None self.print_method(name)
self.stream = stream
if module_name is None:
self.module_name = "fluid"
else:
self.module_name = "fluid." + module_name
if module_name is None:
self.module = fluid
else:
self.module = fluid
for each_module_name in module_name.split('.'):
if not hasattr(self.module, each_module_name):
raise ValueError("Cannot find fluid.{0}".format(module_name))
else:
self.module = getattr(self.module, each_module_name)
if module_prefix is None:
self.module_prefix = self.module_name
else: else:
self.module_prefix = "fluid." + module_prefix pass
self.stream.write('''.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
''')
header_name = self.module_name class DocGenerator(object):
if module_prefix is not None: def __init__(self, module_name=None, module_prefix=None):
prefix_len = len(self.module_prefix) self.module_name = module_name
assert self.module_prefix == self.module_name[0:prefix_len], \ self.module_prefix = module_prefix
"module_prefix must be prefix of module_name" self.stream = None
diff_name = self.module_name[prefix_len+1:]
if diff_name != "": @contextlib.contextmanager
header_name = diff_name def guard(self, filename):
assert self.stream is None, "stream must be None"
self._print_header_(header_name, dot='=', is_title=True) self.stream = open(filename, 'w')
yield
self.stream.close()
self.stream = None
def print_submodule(self, submodule_name): def print_submodule(self, submodule_name):
submodule = getattr(self.module, submodule_name) submodule = getattr(self.module, submodule_name)
...@@ -118,6 +103,12 @@ class DocGenerator(object): ...@@ -118,6 +103,12 @@ class DocGenerator(object):
'''.format(self.module_prefix, name)) '''.format(self.module_prefix, name))
def print_header_reminder(self):
self.stream.write('''.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
''')
def _print_header_(self, name, dot, is_title): def _print_header_(self, name, dot, is_title):
dot_line = dot * len(name) dot_line = dot * len(name)
if is_title: if is_title:
...@@ -133,15 +124,66 @@ class DocGenerator(object): ...@@ -133,15 +124,66 @@ class DocGenerator(object):
self.stream.write(".. _api_{0}_{1}:\n\n".format("_".join( self.stream.write(".. _api_{0}_{1}:\n\n".format("_".join(
self.module_prefix.split(".")), name)) self.module_prefix.split(".")), name))
def generate_doc(module_name, module_prefix, output, to_multiple_files):
if module_name == "":
module_name = None
if module_prefix == "":
module_prefix = None
gen = DocGenerator()
if module_name is None:
gen.module = fluid
gen.module_name = 'fluid'
else:
gen.module = fluid
for each_module_name in module_name.split('.'):
if not hasattr(gen.module, each_module_name):
raise ValueError("Cannot find fluid.{0}".format(module_name))
else:
gen.module = getattr(gen.module, each_module_name)
gen.module_name = "fluid." + module_name
if module_prefix is None:
gen.module_prefix = gen.module_name
else:
gen.module_prefix = "fluid." + module_prefix
dirname = output if to_multiple_files else os.path.dirname(output)
if len(dirname) > 0 and (not os.path.exists(dirname) or not os.path.isdir(dirname)):
os.makedirs(dirname)
if not to_multiple_files:
header_name = gen.module_name
if module_prefix is not None:
prefix_len = len(gen.module_prefix)
assert gen.module_prefix == gen.module_name[0:prefix_len], \
"module_prefix must be prefix of module_name"
diff_name = gen.module_name[prefix_len+1:]
if diff_name != "":
header_name = diff_name
else:
header_name = None
if not to_multiple_files:
with gen.guard(output):
gen.print_header_reminder()
gen._print_header_(header_name, dot='=', is_title=True)
gen.print_current_module()
else:
apis = sorted(gen.module.__all__,key=str.lower)
for api in apis:
header_name = api
with gen.guard(os.path.join(output, api + '.rst')):
gen.print_header_reminder()
gen.print_item(api)
def main(): def main():
args = parse_arg() args = parse_arg()
gen = DocGenerator(args.module, args.module_prefix) generate_doc(args.module_name, args.module_prefix, args.output, args.to_multiple_files)
if args.submodules is None:
gen.print_current_module()
else:
for submodule_name in args.submodules:
gen.print_submodule(submodule_name)
if __name__ == '__main__': if __name__ == '__main__':
......
#!/bin/bash #!/bin/bash
mkdir -p layers for module in nn
do
python gen_doc.py --module_name layers.${module} --module_prefix layers --output layers/${module} --to_multiple_files True
done
for module in control_flow io nn ops tensor learning_rate_scheduler detection metric_op for module in control_flow io ops tensor learning_rate_scheduler detection metric_op
do do
python gen_doc.py --module layers.${module} --module_prefix layers > layers/${module}.rst python gen_doc.py --module_name layers.${module} --module_prefix layers --output layers/${module}.rst
done done
for module in data_feeder dataset clip metrics executor initializer io nets optimizer profiler regularizer transpiler recordio_writer backward average profiler unique_name for module in data_feeder dataset clip metrics executor initializer io nets optimizer profiler regularizer transpiler recordio_writer backward average profiler unique_name
do do
python gen_doc.py --module ${module} --module_prefix ${module} > ${module}.rst python gen_doc.py --module_name ${module} --module_prefix ${module} --output ${module}.rst
done done
python gen_doc.py --module "" --module_prefix "" > fluid.rst python gen_doc.py --module_name "" --module_prefix "" --output fluid.rst
python gen_module_index.py layers.nn nn
python gen_module_index.py layers fluid.layers
python gen_index.py python gen_index.py
import glob
import sys
import os
def print_module_index(module, header):
modules = module.split('.')
if len(modules) > 1:
os.chdir('/'.join(modules[0:-1]))
pattern = modules[-1] + '/*.rst'
stream = open(modules[-1] + '.rst', 'w')
else:
pattern = modules[0] + '/*.rst'
stream = open(modules[0] + '.rst', 'w')
stream.write('=' * len(header) + '\n')
stream.write(header + '\n')
stream.write('=' * len(header) + '\n')
stream.write('''
.. toctree::
:maxdepth: 1
''')
blank_num = 4
files = sorted(glob.glob(pattern), key=str.lower)
for f in files:
stream.write(' ' * blank_num)
stream.write(f)
stream.write('\n')
stream.close()
if __name__ == '__main__':
if len(sys.argv) != 3:
print('Usage: python gen_module_index.py [module_name] [header_name]')
sys.exit(-1)
print_module_index(sys.argv[1], sys.argv[2])
...@@ -7,7 +7,6 @@ fluid.layers ...@@ -7,7 +7,6 @@ fluid.layers
layers/control_flow.rst layers/control_flow.rst
layers/detection.rst layers/detection.rst
layers/device.rst
layers/io.rst layers/io.rst
layers/learning_rate_scheduler.rst layers/learning_rate_scheduler.rst
layers/metric_op.rst layers/metric_op.rst
......
此差异已折叠。
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_adaptive_pool2d:
adaptive_pool2d
---------------
.. autofunction:: paddle.fluid.layers.adaptive_pool2d
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_adaptive_pool3d:
adaptive_pool3d
---------------
.. autofunction:: paddle.fluid.layers.adaptive_pool3d
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_add_position_encoding:
add_position_encoding
---------------------
.. autofunction:: paddle.fluid.layers.add_position_encoding
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_affine_channel:
affine_channel
--------------
.. autofunction:: paddle.fluid.layers.affine_channel
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_affine_grid:
affine_grid
-----------
.. autofunction:: paddle.fluid.layers.affine_grid
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_autoincreased_step_counter:
autoincreased_step_counter
--------------------------
.. autofunction:: paddle.fluid.layers.autoincreased_step_counter
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_batch_norm:
batch_norm
----------
.. autofunction:: paddle.fluid.layers.batch_norm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_beam_search:
beam_search
-----------
.. autofunction:: paddle.fluid.layers.beam_search
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_beam_search_decode:
beam_search_decode
------------------
.. autofunction:: paddle.fluid.layers.beam_search_decode
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_bilinear_tensor_product:
bilinear_tensor_product
-----------------------
.. autofunction:: paddle.fluid.layers.bilinear_tensor_product
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_bpr_loss:
bpr_loss
--------
.. autofunction:: paddle.fluid.layers.bpr_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_brelu:
brelu
-----
.. autofunction:: paddle.fluid.layers.brelu
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_chunk_eval:
chunk_eval
----------
.. autofunction:: paddle.fluid.layers.chunk_eval
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_clip:
clip
----
.. autofunction:: paddle.fluid.layers.clip
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_clip_by_norm:
clip_by_norm
------------
.. autofunction:: paddle.fluid.layers.clip_by_norm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_continuous_value_model:
continuous_value_model
----------------------
.. autofunction:: paddle.fluid.layers.continuous_value_model
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_conv2d:
conv2d
------
.. autofunction:: paddle.fluid.layers.conv2d
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_conv2d_transpose:
conv2d_transpose
----------------
.. autofunction:: paddle.fluid.layers.conv2d_transpose
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_conv3d:
conv3d
------
.. autofunction:: paddle.fluid.layers.conv3d
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_conv3d_transpose:
conv3d_transpose
----------------
.. autofunction:: paddle.fluid.layers.conv3d_transpose
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_cos_sim:
cos_sim
-------
.. autofunction:: paddle.fluid.layers.cos_sim
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_crf_decoding:
crf_decoding
------------
.. autofunction:: paddle.fluid.layers.crf_decoding
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_crop:
crop
----
.. autofunction:: paddle.fluid.layers.crop
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_cross_entropy:
cross_entropy
-------------
.. autofunction:: paddle.fluid.layers.cross_entropy
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_ctc_greedy_decoder:
ctc_greedy_decoder
------------------
.. autofunction:: paddle.fluid.layers.ctc_greedy_decoder
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_data_norm:
data_norm
---------
.. autofunction:: paddle.fluid.layers.data_norm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_deformable_conv:
deformable_conv
---------------
.. autofunction:: paddle.fluid.layers.deformable_conv
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_dice_loss:
dice_loss
---------
.. autofunction:: paddle.fluid.layers.dice_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_dropout:
dropout
-------
.. autofunction:: paddle.fluid.layers.dropout
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_dynamic_gru:
dynamic_gru
-----------
.. autofunction:: paddle.fluid.layers.dynamic_gru
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_dynamic_lstm:
dynamic_lstm
------------
.. autofunction:: paddle.fluid.layers.dynamic_lstm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_dynamic_lstmp:
dynamic_lstmp
-------------
.. autofunction:: paddle.fluid.layers.dynamic_lstmp
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_edit_distance:
edit_distance
-------------
.. autofunction:: paddle.fluid.layers.edit_distance
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_add:
elementwise_add
---------------
.. autofunction:: paddle.fluid.layers.elementwise_add
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_div:
elementwise_div
---------------
.. autofunction:: paddle.fluid.layers.elementwise_div
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_floordiv:
elementwise_floordiv
--------------------
.. autofunction:: paddle.fluid.layers.elementwise_floordiv
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_max:
elementwise_max
---------------
.. autofunction:: paddle.fluid.layers.elementwise_max
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_min:
elementwise_min
---------------
.. autofunction:: paddle.fluid.layers.elementwise_min
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_mod:
elementwise_mod
---------------
.. autofunction:: paddle.fluid.layers.elementwise_mod
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_mul:
elementwise_mul
---------------
.. autofunction:: paddle.fluid.layers.elementwise_mul
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_pow:
elementwise_pow
---------------
.. autofunction:: paddle.fluid.layers.elementwise_pow
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elementwise_sub:
elementwise_sub
---------------
.. autofunction:: paddle.fluid.layers.elementwise_sub
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_elu:
elu
---
.. autofunction:: paddle.fluid.layers.elu
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_embedding:
embedding
---------
.. autofunction:: paddle.fluid.layers.embedding
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_expand:
expand
------
.. autofunction:: paddle.fluid.layers.expand
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_fc:
fc
--
.. autofunction:: paddle.fluid.layers.fc
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_flatten:
flatten
-------
.. autofunction:: paddle.fluid.layers.flatten
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_fsp_matrix:
fsp_matrix
----------
.. autofunction:: paddle.fluid.layers.fsp_matrix
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_gather:
gather
------
.. autofunction:: paddle.fluid.layers.gather
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_gaussian_random:
gaussian_random
---------------
.. autofunction:: paddle.fluid.layers.gaussian_random
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_gaussian_random_batch_size_like:
gaussian_random_batch_size_like
-------------------------------
.. autofunction:: paddle.fluid.layers.gaussian_random_batch_size_like
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_get_tensor_from_selected_rows:
get_tensor_from_selected_rows
-----------------------------
.. autofunction:: paddle.fluid.layers.get_tensor_from_selected_rows
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_grid_sampler:
grid_sampler
------------
.. autofunction:: paddle.fluid.layers.grid_sampler
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_group_norm:
group_norm
----------
.. autofunction:: paddle.fluid.layers.group_norm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_gru_unit:
gru_unit
--------
.. autofunction:: paddle.fluid.layers.gru_unit
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_hard_sigmoid:
hard_sigmoid
------------
.. autofunction:: paddle.fluid.layers.hard_sigmoid
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_hash:
hash
----
.. autofunction:: paddle.fluid.layers.hash
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_hsigmoid:
hsigmoid
--------
.. autofunction:: paddle.fluid.layers.hsigmoid
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_huber_loss:
huber_loss
----------
.. autofunction:: paddle.fluid.layers.huber_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_im2sequence:
im2sequence
-----------
.. autofunction:: paddle.fluid.layers.im2sequence
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_image_resize:
image_resize
------------
.. autofunction:: paddle.fluid.layers.image_resize
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_image_resize_short:
image_resize_short
------------------
.. autofunction:: paddle.fluid.layers.image_resize_short
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_kldiv_loss:
kldiv_loss
----------
.. autofunction:: paddle.fluid.layers.kldiv_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_l2_normalize:
l2_normalize
------------
.. autofunction:: paddle.fluid.layers.l2_normalize
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_label_smooth:
label_smooth
------------
.. autofunction:: paddle.fluid.layers.label_smooth
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_layer_norm:
layer_norm
----------
.. autofunction:: paddle.fluid.layers.layer_norm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_leaky_relu:
leaky_relu
----------
.. autofunction:: paddle.fluid.layers.leaky_relu
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_linear_chain_crf:
linear_chain_crf
----------------
.. autofunction:: paddle.fluid.layers.linear_chain_crf
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_lod_reset:
lod_reset
---------
.. autofunction:: paddle.fluid.layers.lod_reset
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_log:
log
---
.. autofunction:: paddle.fluid.layers.log
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_log_loss:
log_loss
--------
.. autofunction:: paddle.fluid.layers.log_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_logical_and:
logical_and
-----------
.. autofunction:: paddle.fluid.layers.logical_and
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_logical_not:
logical_not
-----------
.. autofunction:: paddle.fluid.layers.logical_not
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_logical_or:
logical_or
----------
.. autofunction:: paddle.fluid.layers.logical_or
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_logical_xor:
logical_xor
-----------
.. autofunction:: paddle.fluid.layers.logical_xor
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_lrn:
lrn
---
.. autofunction:: paddle.fluid.layers.lrn
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_lstm:
lstm
----
.. autofunction:: paddle.fluid.layers.lstm
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_lstm_unit:
lstm_unit
---------
.. autofunction:: paddle.fluid.layers.lstm_unit
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_margin_rank_loss:
margin_rank_loss
----------------
.. autofunction:: paddle.fluid.layers.margin_rank_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_matmul:
matmul
------
.. autofunction:: paddle.fluid.layers.matmul
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_maxout:
maxout
------
.. autofunction:: paddle.fluid.layers.maxout
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_mean:
mean
----
.. autofunction:: paddle.fluid.layers.mean
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_mean_iou:
mean_iou
--------
.. autofunction:: paddle.fluid.layers.mean_iou
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_merge_selected_rows:
merge_selected_rows
-------------------
.. autofunction:: paddle.fluid.layers.merge_selected_rows
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_mul:
mul
---
.. autofunction:: paddle.fluid.layers.mul
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_multiplex:
multiplex
---------
.. autofunction:: paddle.fluid.layers.multiplex
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_nce:
nce
---
.. autofunction:: paddle.fluid.layers.nce
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_npair_loss:
npair_loss
----------
.. autofunction:: paddle.fluid.layers.npair_loss
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_one_hot:
one_hot
-------
.. autofunction:: paddle.fluid.layers.one_hot
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_pad:
pad
---
.. autofunction:: paddle.fluid.layers.pad
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_pad2d:
pad2d
-----
.. autofunction:: paddle.fluid.layers.pad2d
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_pad_constant_like:
pad_constant_like
-----------------
.. autofunction:: paddle.fluid.layers.pad_constant_like
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_pixel_shuffle:
pixel_shuffle
-------------
.. autofunction:: paddle.fluid.layers.pixel_shuffle
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_pool2d:
pool2d
------
.. autofunction:: paddle.fluid.layers.pool2d
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers_pool3d:
pool3d
------
.. autofunction:: paddle.fluid.layers.pool3d
:noindex:
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册