parent
01dc15ce32
commit
aae15f0a67
@ -1,9 +0,0 @@
|
||||
add_custom_target(paddle_apis ALL
|
||||
DEPENDS paddle_v2_apis)
|
||||
|
||||
add_custom_target(paddle_docs ALL
|
||||
DEPENDS paddle_v2_docs paddle_v2_docs_cn
|
||||
paddle_mobile_docs paddle_mobile_docs_cn)
|
||||
|
||||
add_subdirectory(v2)
|
||||
add_subdirectory(mobile)
|
@ -1,52 +0,0 @@
|
||||
if(NOT DEFINED SPHINX_THEME)
|
||||
set(SPHINX_THEME default)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SPHINX_THEME_DIR)
|
||||
set(SPHINX_THEME_DIR)
|
||||
endif()
|
||||
|
||||
# configured documentation tools and intermediate build results
|
||||
set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build")
|
||||
|
||||
# Sphinx cache with pickled ReST documents
|
||||
set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
|
||||
|
||||
# HTML output director
|
||||
set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html")
|
||||
|
||||
set(IMPORT_PADDLE_STRING "")
|
||||
set(IMPORT_PADDLEV2_STRING "")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.en.in"
|
||||
"${BINARY_BUILD_DIR_EN}/conf.py"
|
||||
@ONLY)
|
||||
|
||||
sphinx_add_target(paddle_mobile_docs
|
||||
html
|
||||
${BINARY_BUILD_DIR_EN}
|
||||
${SPHINX_CACHE_DIR_EN}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_HTML_DIR_EN})
|
||||
|
||||
# configured documentation tools and intermediate build results
|
||||
set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build")
|
||||
|
||||
# Sphinx cache with pickled ReST documents
|
||||
set(SPHINX_CACHE_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_doctrees")
|
||||
|
||||
# HTML output director
|
||||
set(SPHINX_HTML_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/html")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.cn.in"
|
||||
"${BINARY_BUILD_DIR_CN}/conf.py"
|
||||
@ONLY)
|
||||
|
||||
sphinx_add_target(paddle_mobile_docs_cn
|
||||
html
|
||||
${BINARY_BUILD_DIR_CN}
|
||||
${SPHINX_CACHE_DIR_CN}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_HTML_DIR_CN})
|
@ -1,62 +0,0 @@
|
||||
# Build PaddlePaddle for Raspberry Pi
|
||||
|
||||
You may use any of the following two approaches to build the inference library of PaddlePaddle for Raspberry Pi:
|
||||
|
||||
1. Build using SSH: Log in to a Raspberry Pi using SSH and build the library. The required development tools and third-party dependencies are listed in here: [`/Dockerfile`](https://github.com/PaddlePaddle/Paddle/blob/develop/Dockerfile).
|
||||
|
||||
1. Cross-compile: We talk about how to cross-compile PaddlePaddle for Raspberry Pi on a Linux/x64 machine, in more detail in this article.
|
||||
|
||||
## The Cross-Compiling Toolchain
|
||||
|
||||
Step 1. Clone the Github repo by running the following command.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/raspberrypi/tools.git
|
||||
```
|
||||
|
||||
Step 2. Use the pre-built cross-compiler found in `./tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64`. To run it on a Linux computer, glibc version >= 2.14 is needed.
|
||||
|
||||
## CMake Arguments
|
||||
|
||||
CMake supports [cross-compiling](https://cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html#cross-compiling). All CMake configuration arguments required for the cross-compilation for Raspberry Pi can be found in [`cmake/cross_compiling/raspberry_pi.cmake`](https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/cross_compiling/raspberry_pi.cmake).
|
||||
|
||||
Some important arguments that need to be set:
|
||||
|
||||
- `CMAKE_SYSTEM_NAME`: The target platform. Must be `RPi`.
|
||||
|
||||
- `RPI_TOOLCHAIN`: The absolute path of the cross-compiling toolchain.
|
||||
|
||||
- `RPI_ARM_NEON`: Use ARM NEON Intrinsics. This is a required argument and set default to `ON`.
|
||||
|
||||
- `HOST_C/CXX_COMPILER`: The C/C++ compiler for the host. It is used to build building tools running on the host, for example, protoc.
|
||||
|
||||
A commonly-used CMake configuration is as follows:
|
||||
|
||||
```
|
||||
cmake -DCMAKE_SYSTEM_NAME=RPi \
|
||||
-DRPI_TOOLCHAIN=your/path/to/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64 \
|
||||
-DRPI_ARM_NEON=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=your/path/to/install \
|
||||
-DWITH_GPU=OFF \
|
||||
-DWITH_C_API=ON \
|
||||
-DWITH_PYTHON=OFF \
|
||||
-DWITH_SWIG_PY=OFF \
|
||||
..
|
||||
```
|
||||
|
||||
To build the inference library, please set the argument WITH\_C\_API to ON: `WITH_C_API=ON`.
|
||||
|
||||
You can add more arguments. For example, to minimize the size of the generated inference library, you may use `CMAKE_BUILD_TYPE=MinSizeRel`. For performance optimization, you may use `CMAKE_BUILD_TYPE=Release`.
|
||||
|
||||
## Build and Install
|
||||
|
||||
The following commands build the inference library of PaddlePaddle for Raspberry Pi and third-party dependencies.
|
||||
|
||||
```bash
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
The intermediate files will be stored in `build`. Third-party libraries will be located in `build/third_party`. If you have already built it for other platforms like Android or iOS, you may want to clear these directories by running the command: `rm -rf build`.
|
||||
|
||||
The infernece library will be in `your/path/to/install/lib`, with related header files in `your/path/to/install/include`.
|
@ -1,9 +0,0 @@
|
||||
移动端
|
||||
======
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
cross_compiling_for_android_cn.md
|
||||
cross_compiling_for_ios_cn.md
|
||||
cross_compiling_for_raspberry_cn.md
|
@ -1,9 +0,0 @@
|
||||
Mobile
|
||||
======
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
cross_compiling_for_android_en.md
|
||||
cross_compiling_for_ios_en.md
|
||||
cross_compiling_for_raspberry_en.md
|
@ -1,71 +0,0 @@
|
||||
# Cluster bootstrapping tool survey
|
||||
## Abstract
|
||||
In order to bring up a cluster from bare metal machine to a fully functional kubernetes cluster for Paddlepaddle to run, we need to utilize some tools. Here we are going to compare [Sextant](https://github.com/k8sp/sextant) and [Tectonic installer](https://github.com/coreos/tectonic-installer)
|
||||
|
||||
## Basic assumptions
|
||||
Here are some basic assumptions before we move on to details
|
||||
1. You are an administrator of a bare metal machine cluster, which means:
|
||||
* you have full control to each of the machines.
|
||||
* you have full control to the network which machines are connected to.
|
||||
2. Machines can be booted from network with PEX or iPXE
|
||||
3. You understand the [general procedure to bring up a cluster](#appendix-general-procedure-to-bring-up-a-cluster)
|
||||
|
||||
if your cluster is able to mark above items with checkmarks, then keep reading.
|
||||
|
||||
## Comparing Sextant and Tectonic installer
|
||||
### Sextant
|
||||
Sextant is an end2end solution to bring up a bare metal cluster to a fully functional k8s cluster, it integrates DHCP, name service, PEX, cloud-config-service, docker registry services altogether.
|
||||
|
||||
#### Pros
|
||||
1. End2End: basically all admin need to do is to config the cluster.yaml and power on the cluster.
|
||||
2. Offline cluster configuration: Sextant has 2 phases during working with it, config time and deploy time. when admin is configuring, it requires admin's machine has internet connectivity, which will download some images, etc. But in deploy time, it's completely OK to go offline since all dependencies are ready during config time.
|
||||
3. docker registry integrated.
|
||||
4. GPU machine took care of.
|
||||
|
||||
### Cons
|
||||
1. k8s API server is not deployed with high availability in considering by default.
|
||||
2. No grouping support.
|
||||
3. No API interface, a one-off service.
|
||||
|
||||
|
||||
### Tectonic installer
|
||||
First of all, Tectonic is not free, it requires coreos.com account as a step of installation, and free user can only create less than 10 nodes.
|
||||
|
||||
Tectonic is a suite of software which wraps around k8s and providing more utility regarding dev ops, ie,
|
||||
Tectonic installer as it's named, it installs Tectonic to a bare metal cluster which means it's not totally an equivalent of Sextant. At the "booting a cluster" part, it mostly utilizes [Matchbox](https://github.com/coreos/matchbox), which is a general cluster bootstrapper.
|
||||
|
||||
Matchbox's Approach is similar to Sexstant.
|
||||
|
||||
### Pros
|
||||
1. supports grouping machines.
|
||||
2. supports running provisioning service in rtk. (not a big deal though).
|
||||
3. supports http/gRPC API interface.
|
||||
4. supports multi-template.
|
||||
|
||||
### Cons
|
||||
1. Not an e2e solution to bring up a cluster, need a lot of extra work and other software.
|
||||
2. [Not fully supporting](https://github.com/coreos/matchbox/issues/550) centOS deployment yet.
|
||||
|
||||
## Conclusion
|
||||
Sextant is a better solution overall for paddle cloud deploying to a bare metal cluster. It would be great if Sextant can also 1) deploy k8s api server with high availability by default; 2) not designed as a one-off service.
|
||||
|
||||
|
||||
|
||||
## Appendix: General procedure to bring up a cluster
|
||||
It's physically impossible for a cluster admin to manually install OS and applications into cluster nodes one by one, here is what an admin would do in cloud industry:
|
||||
1. setup a bootstrap machine with static IP in the cluster, which has following services:
|
||||
* DHCP: assigns ip address for rest of the nodes.
|
||||
* name service: to map node name to a IP
|
||||
* PXE related services: the booting related info will be delivered to newly booted machines as their IP is assigned via DHCP service, PXE service will provide further booting and installing info and image with TFTP and http protocol.
|
||||
* cluster config service: this is for providing cluster node with OS config via http
|
||||
* optional docker registry: a built-in docker registry makes the whole cluster independent from connecting internet, and speeds up software distribution.
|
||||
2. New node powers on, it will
|
||||
* broadcast the request for an IP address
|
||||
* DHCP server assigns the IP address, and deliver the PXE booting related info to the node.
|
||||
* cluster node will request config files with booting info delivered with DHCP via the TFTP service, and in most of the cases, the config file will point to a http service for the booting image.
|
||||
* Since PXE is configured with initrd, it will utilize the cloud config service and do further installations like coreOS or K8s installations.
|
||||
* then restart the node.
|
||||
|
||||
For further understanding, following 2 links from Matchbox are some good readings:
|
||||
* [Machine lifecycle](https://github.com/coreos/matchbox/blob/master/Documentation/machine-lifecycle.md)
|
||||
* [PXE booting](https://github.com/coreos/matchbox/blob/master/Documentation/network-booting.md)
|
File diff suppressed because one or more lines are too long
@ -1,20 +0,0 @@
|
||||
# Operator fusion
|
||||
Fusing multiple operators together is an important method to optimize the program execution, particularly for GPU or other specialized accelerators. An obvious benefit is to avoid the overhead of saving the intermediate result back into global memory.
|
||||
|
||||
There are generally two ways to fuse operators, fusing directly connected operators and fusing non directly connected operators. The first method is mainly used by [NNVM Compiler](https://github.com/dmlc/tvm/) and [XLA](https://www.tensorflow.org/performance/xla/). The second method is mainly used by Dynet and TensorFlow Fold to do auto-batching. The principle of fusing operator is according to some rules to combine multiple operations into one, for example, `Y = X * W` and `Z = Y + B` can be fused to `Z = X * W + B`, and `Y1 = X1 * W` and `Y2 = X2 * W` can be fused to `[Y1;Y2] = [X1;X2] * W`. In order to get a short-term profit, we decided to try to manually specify these rules.
|
||||
|
||||
## Challenge
|
||||
The challenge of fusing operators is:
|
||||
- how to make the rules.
|
||||
- how to implement these rules efficiently.
|
||||
|
||||
### How to make the rules?
|
||||
|
||||
The problem of determining the best single location for a fusion operator is an NP-hard combinatorial problem. After analysis the operators of the DL model, we found there are two group of operators can be fused explicitly, one is the simple and adjacent operations, for example, `tmp = x + y` and `z = Relu(tmp)`, and the other is the operators that have the same function, for example, a serials of `SGD` or `Momentum`. They usually appear in the model in a large number. So we should think about how to fuse them separately first.
|
||||
|
||||
### How to implement these rules efficiently?
|
||||
#### How to fuse the adjacent operations efficiently?
|
||||
Here we use a template function to represent the fused operations. The pros of using a template function are that it is simple and efficient, and the cons are that it is not easy to expand, and it can only be used to express some simple operations. So taking into account our current needs, the template function is more appropriate.
|
||||
|
||||
#### How to fuse the operators that have the same function efficiently?
|
||||
We take SGD operator as an example, the training model may have hundreds of parameters and correspondingly have the same number of SGD operators. The expression(`w = w - lr*w_g`) of those operators is the same, so during of training, the executor will execute this expression hundreds time in CPU or other specialized accelerators. If we can fuse them and make the address of all `w` and all `w_g` continuous respectively, we only need execute one time. For some accelerators, the time of launching kernel is not neglected, so the time of hundreds of times of launching and executing kernel may be larger than launching and executing only once. There usually are many operators that similar to `SGD` in the DL model, such as `AllReduce` and `FC`.
|
@ -1,151 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# documentation build configuration file, created by
|
||||
# sphinx-quickstart on Thu Jul 23 19:40:08 2015.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
import sys
|
||||
import os, subprocess
|
||||
sys.path.insert(0, os.path.abspath('@PADDLE_BINARY_DIR@/python'))
|
||||
import shlex
|
||||
from recommonmark import parser, transform
|
||||
@IMPORT_PADDLE_STRING@
|
||||
@IMPORT_PADDLEV2_STRING@
|
||||
|
||||
MarkdownParser = parser.CommonMarkParser
|
||||
AutoStructify = transform.AutoStructify
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
templates_path = ["@PADDLE_SOURCE_DIR@/doc/templates"]
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# General information about the project.
|
||||
project = u'PaddlePaddle'
|
||||
author = u'%s developers' % project
|
||||
copyright = u'2016, %s' % author
|
||||
github_doc_root = ''
|
||||
|
||||
# add markdown parser
|
||||
MarkdownParser.github_doc_root = github_doc_root
|
||||
source_parsers = {
|
||||
'.md': MarkdownParser,
|
||||
'.Rmd': MarkdownParser,
|
||||
}
|
||||
os.environ['PADDLE_BUILD_DOC'] = '1'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx.ext.graphviz'
|
||||
]
|
||||
mathjax_path="https://cdn.bootcss.com/mathjax/2.7.0/MathJax.js"
|
||||
table_styling_embed_css = True
|
||||
|
||||
autodoc_member_order = 'bysource'
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = ['.rst', '.md', '.Rmd']
|
||||
|
||||
# The encoding of source files.
|
||||
source_encoding = 'utf-8'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index_cn'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = 'zh_CN'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build', '**/*_en*', '*_en*', 'api/*']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = []
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = project + 'doc'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
latex_elements = {
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, '%s.tex' % project, project,
|
||||
author, 'manual'),
|
||||
]
|
||||
|
||||
# Use the .. admonition:: directive for Notes sections.
|
||||
# False to use the .. rubric:: directive instead.
|
||||
napoleon_use_admonition_for_notes = True
|
||||
|
||||
def setup(app):
|
||||
# Add hook for building doxygen xml when needed
|
||||
# no c++ API for now
|
||||
app.add_config_value('recommonmark_config', {
|
||||
'url_resolver': lambda url: github_doc_root + url,
|
||||
}, True)
|
||||
app.add_transform(AutoStructify)
|
@ -1,152 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# documentation build configuration file, created by
|
||||
# sphinx-quickstart on Thu Jul 23 19:40:08 2015.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
import sys
|
||||
import os, subprocess
|
||||
sys.path.insert(0, os.path.abspath('@PADDLE_BINARY_DIR@/python'))
|
||||
import shlex
|
||||
from recommonmark import parser, transform
|
||||
@IMPORT_PADDLE_STRING@
|
||||
@IMPORT_PADDLEV2_STRING@
|
||||
|
||||
|
||||
MarkdownParser = parser.CommonMarkParser
|
||||
AutoStructify = transform.AutoStructify
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
templates_path = ["@PADDLE_SOURCE_DIR@/doc/templates"]
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# General information about the project.
|
||||
project = u'PaddlePaddle'
|
||||
author = u'%s developers' % project
|
||||
copyright = u'2016, %s' % author
|
||||
github_doc_root = ''
|
||||
|
||||
# add markdown parser
|
||||
MarkdownParser.github_doc_root = github_doc_root
|
||||
source_parsers = {
|
||||
'.md': MarkdownParser,
|
||||
'.Rmd': MarkdownParser,
|
||||
}
|
||||
os.environ['PADDLE_BUILD_DOC'] = '1'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.napoleon',
|
||||
]
|
||||
|
||||
|
||||
autodoc_member_order = 'bysource'
|
||||
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = ['.rst', '.md', '.Rmd']
|
||||
|
||||
# The encoding of source files.
|
||||
source_encoding = 'utf-8'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index_en'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build', '**/*_cn*', '*_cn*', 'api/*']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = []
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = project + 'doc'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
latex_elements = {
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, '%s.tex' % project, project,
|
||||
author, 'manual'),
|
||||
]
|
||||
|
||||
# Use the .. admonition:: directive for Notes sections.
|
||||
# False to use the .. rubric:: directive instead.
|
||||
napoleon_use_admonition_for_notes = True
|
||||
|
||||
def setup(app):
|
||||
# Add hook for building doxygen xml when needed
|
||||
# no c++ API for now
|
||||
app.add_config_value('recommonmark_config', {
|
||||
'url_resolver': lambda url: github_doc_root + url,
|
||||
'enable_eval_rst': True,
|
||||
}, True)
|
||||
app.add_transform(AutoStructify)
|
@ -1,23 +0,0 @@
|
||||
{# layout.html #}
|
||||
{# Import the theme's layout. #}
|
||||
{% extends "!layout.html" %}
|
||||
|
||||
{# SIDE NAV, TOGGLES ON MOBILE #}
|
||||
{% block menu %}
|
||||
<nav class="doc-menu-vertical" role="navigation">
|
||||
{% set toctree = toctree(maxdepth=-1, collapse=False,titles_only=True, includehidden=True) %}
|
||||
{{ toctree }}
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{%- block extrahead %}
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?b9a314ab40d04d805655aab1deee08ba";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
@ -1,54 +0,0 @@
|
||||
if(NOT DEFINED SPHINX_THEME)
|
||||
set(SPHINX_THEME default)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SPHINX_THEME_DIR)
|
||||
set(SPHINX_THEME_DIR)
|
||||
endif()
|
||||
|
||||
# configured documentation tools and intermediate build results
|
||||
set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build")
|
||||
|
||||
# Sphinx cache with pickled ReST documents
|
||||
set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
|
||||
|
||||
# HTML output director
|
||||
set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html")
|
||||
|
||||
set(IMPORT_PADDLE_STRING "")
|
||||
set(IMPORT_PADDLEV2_STRING "")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.en.in"
|
||||
"${BINARY_BUILD_DIR_EN}/conf.py"
|
||||
@ONLY)
|
||||
|
||||
sphinx_add_target(paddle_v2_docs
|
||||
html
|
||||
${BINARY_BUILD_DIR_EN}
|
||||
${SPHINX_CACHE_DIR_EN}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_HTML_DIR_EN})
|
||||
|
||||
# configured documentation tools and intermediate build results
|
||||
set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build")
|
||||
|
||||
# Sphinx cache with pickled ReST documents
|
||||
set(SPHINX_CACHE_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_doctrees")
|
||||
|
||||
# HTML output directory
|
||||
set(SPHINX_HTML_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/html")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.cn.in"
|
||||
"${BINARY_BUILD_DIR_CN}/conf.py"
|
||||
@ONLY)
|
||||
|
||||
sphinx_add_target(paddle_v2_docs_cn
|
||||
html
|
||||
${BINARY_BUILD_DIR_CN}
|
||||
${SPHINX_CACHE_DIR_CN}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_HTML_DIR_CN})
|
||||
|
||||
add_subdirectory(api)
|
@ -1,25 +0,0 @@
|
||||
# configured documentation tools and intermediate build results
|
||||
set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build")
|
||||
|
||||
# Sphinx cache with pickled ReST documents
|
||||
set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
|
||||
|
||||
# HTML output director
|
||||
set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html")
|
||||
|
||||
set(IMPORT_PADDLE_STRING "import paddle")
|
||||
set(IMPORT_PADDLEV2_STRING "import paddle.v2")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../../templates/conf.py.en.in"
|
||||
"${BINARY_BUILD_DIR_EN}/conf.py"
|
||||
@ONLY)
|
||||
|
||||
sphinx_add_target(paddle_v2_apis
|
||||
html
|
||||
${BINARY_BUILD_DIR_EN}
|
||||
${SPHINX_CACHE_DIR_EN}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SPHINX_HTML_DIR_EN})
|
||||
|
||||
add_dependencies(paddle_v2_apis gen_proto_py framework_py_proto copy_paddle_pybind paddle_python)
|
@ -1,108 +0,0 @@
|
||||
===========
|
||||
Activation
|
||||
===========
|
||||
|
||||
Abs
|
||||
===
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Abs
|
||||
:noindex:
|
||||
|
||||
Exp
|
||||
===
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Exp
|
||||
:noindex:
|
||||
|
||||
Identity
|
||||
========
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Identity
|
||||
:noindex:
|
||||
|
||||
Linear
|
||||
======
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Linear
|
||||
:noindex:
|
||||
|
||||
Log
|
||||
===
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Log
|
||||
:noindex:
|
||||
|
||||
Square
|
||||
======
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Square
|
||||
:noindex:
|
||||
|
||||
Sigmoid
|
||||
=======
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Sigmoid
|
||||
:noindex:
|
||||
|
||||
Softmax
|
||||
=======
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Softmax
|
||||
:noindex:
|
||||
|
||||
SequenceSoftmax
|
||||
===============
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: SequenceSoftmax
|
||||
:noindex:
|
||||
|
||||
Relu
|
||||
====
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Relu
|
||||
:noindex:
|
||||
|
||||
BRelu
|
||||
=====
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: BRelu
|
||||
:noindex:
|
||||
|
||||
SoftRelu
|
||||
========
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: SoftRelu
|
||||
:noindex:
|
||||
|
||||
Tanh
|
||||
====
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: Tanh
|
||||
:noindex:
|
||||
|
||||
STanh
|
||||
=====
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: STanh
|
||||
:noindex:
|
||||
|
||||
SoftSign
|
||||
========
|
||||
|
||||
.. automodule:: paddle.v2.activation
|
||||
:members: SoftSign
|
||||
:noindex:
|
@ -1,6 +0,0 @@
|
||||
Parameter Attribute
|
||||
===================
|
||||
|
||||
.. automodule:: paddle.v2.attr
|
||||
:members:
|
||||
:noindex:
|
@ -1,110 +0,0 @@
|
||||
.. _api_v2:
|
||||
|
||||
==========
|
||||
Evaluators
|
||||
==========
|
||||
|
||||
Classification
|
||||
==============
|
||||
|
||||
classification_error
|
||||
--------------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: classification_error
|
||||
:noindex:
|
||||
|
||||
auc
|
||||
---
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: auc
|
||||
:noindex:
|
||||
|
||||
ctc_error
|
||||
---------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: ctc_error
|
||||
:noindex:
|
||||
|
||||
chunk
|
||||
-----
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: chunk
|
||||
:noindex:
|
||||
|
||||
precision_recall
|
||||
----------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: precision_recall
|
||||
:noindex:
|
||||
|
||||
Rank
|
||||
====
|
||||
|
||||
pnpair
|
||||
------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: pnpair
|
||||
:noindex:
|
||||
|
||||
Utils
|
||||
=====
|
||||
|
||||
sum
|
||||
---
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: sum
|
||||
:noindex:
|
||||
|
||||
column_sum
|
||||
----------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: column_sum
|
||||
:noindex:
|
||||
|
||||
Print
|
||||
=====
|
||||
|
||||
classification_error_printer
|
||||
----------------------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: classification_error_printer
|
||||
:noindex:
|
||||
|
||||
gradient_printer
|
||||
----------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: gradient_printer
|
||||
:noindex:
|
||||
|
||||
maxid_printer
|
||||
-------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: maxid_printer
|
||||
:noindex:
|
||||
|
||||
maxframe_printer
|
||||
----------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: maxframe_printer
|
||||
:noindex:
|
||||
|
||||
seqtext_printer
|
||||
---------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: seqtext_printer
|
||||
:noindex:
|
||||
|
||||
value_printer
|
||||
-------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: value_printer
|
||||
:noindex:
|
||||
|
||||
Detection
|
||||
==========
|
||||
|
||||
detection_map
|
||||
-------------
|
||||
.. automodule:: paddle.v2.evaluator
|
||||
:members: detection_map
|
||||
:noindex:
|
File diff suppressed because it is too large
Load Diff
@ -1,132 +0,0 @@
|
||||
========
|
||||
Networks
|
||||
========
|
||||
|
||||
The v2.networks module contains pieces of neural network that combine multiple layers.
|
||||
|
||||
NLP
|
||||
===
|
||||
|
||||
sequence_conv_pool
|
||||
------------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: sequence_conv_pool
|
||||
:noindex:
|
||||
|
||||
.. _api_trainer_config_helpers_network_text_conv_pool:
|
||||
|
||||
text_conv_pool
|
||||
--------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: text_conv_pool
|
||||
:noindex:
|
||||
|
||||
Images
|
||||
======
|
||||
|
||||
img_conv_bn_pool
|
||||
----------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: img_conv_bn_pool
|
||||
:noindex:
|
||||
|
||||
img_conv_group
|
||||
--------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: img_conv_group
|
||||
:noindex:
|
||||
|
||||
.. _api_trainer_config_helpers_network_simple_img_conv_pool:
|
||||
|
||||
simple_img_conv_pool
|
||||
--------------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: simple_img_conv_pool
|
||||
:noindex:
|
||||
|
||||
small_vgg
|
||||
---------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: small_vgg
|
||||
:noindex:
|
||||
|
||||
vgg_16_network
|
||||
---------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: vgg_16_network
|
||||
:noindex:
|
||||
|
||||
Recurrent
|
||||
=========
|
||||
|
||||
LSTM
|
||||
----
|
||||
|
||||
lstmemory_unit
|
||||
``````````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: lstmemory_unit
|
||||
:noindex:
|
||||
|
||||
lstmemory_group
|
||||
```````````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: lstmemory_group
|
||||
:noindex:
|
||||
|
||||
simple_lstm
|
||||
```````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: simple_lstm
|
||||
:noindex:
|
||||
|
||||
bidirectional_lstm
|
||||
``````````````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: bidirectional_lstm
|
||||
:noindex:
|
||||
|
||||
GRU
|
||||
---
|
||||
|
||||
gru_unit
|
||||
````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: gru_unit
|
||||
:noindex:
|
||||
|
||||
gru_group
|
||||
`````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: gru_group
|
||||
:noindex:
|
||||
|
||||
simple_gru
|
||||
``````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: simple_gru
|
||||
:noindex:
|
||||
|
||||
simple_gru2
|
||||
```````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: simple_gru2
|
||||
:noindex:
|
||||
|
||||
bidirectional_gru
|
||||
``````````````````
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: bidirectional_gru
|
||||
:noindex:
|
||||
|
||||
simple_attention
|
||||
----------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: simple_attention
|
||||
:noindex:
|
||||
|
||||
dot_product_attention
|
||||
---------------------
|
||||
.. automodule:: paddle.v2.networks
|
||||
:members: dot_product_attention
|
||||
:noindex:
|
@ -1,45 +0,0 @@
|
||||
==========
|
||||
Optimizer
|
||||
==========
|
||||
|
||||
Momentum
|
||||
========
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: Momentum
|
||||
:noindex:
|
||||
|
||||
Adam
|
||||
====
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: Adam
|
||||
:noindex:
|
||||
|
||||
Adamax
|
||||
======
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: Adamax
|
||||
:noindex:
|
||||
|
||||
AdaGrad
|
||||
=======
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: AdaGrad
|
||||
:noindex:
|
||||
|
||||
DecayedAdaGrad
|
||||
==============
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: DecayedAdaGrad
|
||||
:noindex:
|
||||
|
||||
AdaDelta
|
||||
========
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: AdaDelta
|
||||
:noindex:
|
||||
|
||||
RMSProp
|
||||
=======
|
||||
.. automodule:: paddle.v2.optimizer
|
||||
:members: RMSProp
|
||||
:noindex:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue