Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/api/data_provider/pydataprovider2_en.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. _api_pydataprovider:

PyDataProvider2
=================
===============

We highly recommand users to use PyDataProvider2 to provide training or testing
data to PaddlePaddle. The user only needs to focus on how to read a single
Expand Down
32 changes: 17 additions & 15 deletions doc/api/index_en.rst
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
API
====
===

DataProvider API
----------------

.. toctree::
:maxdepth: 1
:maxdepth: 1

data_provider/index_en.rst
data_provider/pydataprovider2_en.rst
data_provider/index_en.rst
data_provider/pydataprovider2_en.rst

.. _api_trainer_config:

Model Config API
----------------

.. toctree::
:maxdepth: 1
:maxdepth: 1

trainer_config_helpers/optimizers.rst
trainer_config_helpers/data_sources.rst
trainer_config_helpers/layers.rst
trainer_config_helpers/activations.rst
trainer_config_helpers/poolings.rst
trainer_config_helpers/networks.rst
trainer_config_helpers/evaluators.rst
trainer_config_helpers/attrs.rst
trainer_config_helpers/optimizers.rst
trainer_config_helpers/data_sources.rst
trainer_config_helpers/layers.rst
trainer_config_helpers/activations.rst
trainer_config_helpers/poolings.rst
trainer_config_helpers/networks.rst
trainer_config_helpers/evaluators.rst
trainer_config_helpers/attrs.rst


Applications API
----------------

.. toctree::
:maxdepth: 1
:maxdepth: 1

predict/swig_py_paddle_en.rst
predict/swig_py_paddle_en.rst
2 changes: 2 additions & 0 deletions doc/api/trainer_config_helpers/data_sources.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _api_trainer_config_helpers_data_sources:

DataSources
===========

Expand Down
12 changes: 12 additions & 0 deletions doc/api/trainer_config_helpers/layers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ LayerOutput
Data layer
===========

.. _api_trainer_config_helpers_layers_data_layer:

data_layer
----------
.. automodule:: paddle.trainer_config_helpers.layers
Expand All @@ -29,6 +31,8 @@ data_layer
Fully Connected Layers
======================

.. _api_trainer_config_helpers_layers_fc_layer:

fc_layer
--------
.. automodule:: paddle.trainer_config_helpers.layers
Expand Down Expand Up @@ -68,6 +72,8 @@ img_conv_layer
:members: img_conv_layer
:noindex:

.. _api_trainer_config_helpers_layers_context_projection:

context_projection
------------------
.. automodule:: paddle.trainer_config_helpers.layers
Expand Down Expand Up @@ -185,6 +191,8 @@ mixed_layer
:members: mixed_layer
:noindex:

.. _api_trainer_config_helpers_layers_embedding_layer:

embedding_layer
---------------
.. automodule:: paddle.trainer_config_helpers.layers
Expand Down Expand Up @@ -237,6 +245,8 @@ trans_full_matrix_projection
Aggregate Layers
================

.. _api_trainer_config_helpers_layers_pooling_layer:

pooling_layer
-------------
.. automodule:: paddle.trainer_config_helpers.layers
Expand Down Expand Up @@ -333,6 +343,8 @@ tensor_layer
:members: tensor_layer
:noindex:

.. _api_trainer_config_helpers_layers_cos_sim:

cos_sim
-------
.. automodule:: paddle.trainer_config_helpers.layers
Expand Down
2 changes: 2 additions & 0 deletions doc/api/trainer_config_helpers/networks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ sequence_conv_pool
:members: sequence_conv_pool
:noindex:

.. _api_trainer_config_helpers_network_text_conv_pool:

text_conv_pool
--------------
.. automodule:: paddle.trainer_config_helpers.networks
Expand Down
1 change: 1 addition & 0 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@ def setup(app):
# 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)
3 changes: 3 additions & 0 deletions doc/howto/cmd_parameter/index_en.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
```eval_rst
.. _cmd_line_index:
Copy link
Contributor

Choose a reason for hiding this comment

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

名字后面加en来区分中英文

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

```
# How to Set Command-line Parameters

* [Use Case](use_case_en.md)
Expand Down
5 changes: 5 additions & 0 deletions doc/tutorials/rec/ml_dataset_en.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
```eval_rst
.. _demo_ml_dataset:
Copy link
Contributor

Choose a reason for hiding this comment

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

名字后面加en来区分中英文

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

```

# MovieLens Dataset

The [MovieLens Dataset](http://grouplens.org/datasets/movielens/) was collected by GroupLens Research.
Expand Down
37 changes: 13 additions & 24 deletions doc/tutorials/rec/ml_regression_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Data Preparation
````````````````
Download and extract dataset
''''''''''''''''''''''''''''
We use `movielens 1m dataset <ml_dataset.html>`_ here.
We use :ref:`demo_ml_dataset` here.
To download and unzip the dataset, simply run the following commands.

.. code-block:: bash
Expand Down Expand Up @@ -239,26 +239,16 @@ Then we combine each features of movie into one movie feature by a
get one user feature. Then we calculate the cosine similarity of these two
features.

In these network, we use several api in `trainer_config_helpers
<../../ui/api/trainer_config_helpers/index.html>`_. There are

* Data Layer, `data_layer
<../../ui/api/trainer_config_helpers/layers.html#id1>`_
* Fully Connected Layer, `fc_layer
<../../ui/api/trainer_config_helpers/layers.html#fc-layer>`_
* Embedding Layer, `embedding_layer
<../../ui/api/trainer_config_helpers/layers.html#embedding-layer>`_
* Context Projection Layer, `context_projection
<../../ui/api/trainer_config_helpers/layers.html#context-projection>`_
* Pooling Layer, `pooling_layer
<../../ui/api/trainer_config_helpers/layers.html#pooling-layer>`_
* Cosine Similarity Layer, `cos_sim
<../../ui/api/trainer_config_helpers/layers.html#cos-sim>`_
* Text Convolution Pooling Layer, `text_conv_pool
<../../ui/api/trainer_config_helpers/networks.html
#trainer_config_helpers.networks.text_conv_pool>`_
* Declare Python Data Sources, `define_py_data_sources2
<../../ui/api/trainer_config_helpers/data_sources.html>`_
In these network, we use several api in :ref:`api_trainer_config` . There are

* Data Layer, :ref:`api_trainer_config_helpers_layers_data_layer`
* Fully Connected Layer, :ref:`api_trainer_config_helpers_layers_fc_layer`
* Embedding Layer, :ref:`api_trainer_config_helpers_layers_embedding_layer`
* Context Projection Layer, :ref:`api_trainer_config_helpers_layers_context_projection`
* Pooling Layer, :ref:`api_trainer_config_helpers_layers_pooling_layer`
* Cosine Similarity Layer, :ref:`api_trainer_config_helpers_layers_cos_sim`
* Text Convolution Pooling Layer, :ref:`api_trainer_config_helpers_network_text_conv_pool`
* Declare Python Data Sources :ref:`api_trainer_config_helpers_data_sources`.

Data Provider
'''''''''''''
Expand All @@ -274,7 +264,7 @@ In this :code:`dataprovider.py`, we should set\:
* use_seq\: Whether this :code:`dataprovider.py` in sequence mode or not.
* process\: Return each sample of data to :code:`paddle`.

The data provider details document see `there <../../ui/data_provider/pydataprovider2.html>`_.
The data provider details document see :ref:`api_pydataprovider`.

Train
`````
Expand All @@ -290,8 +280,7 @@ The run.sh is shown as follow:
It just start a paddle training process, write the log to `log.txt`,
then print it on screen.

Each command line argument in :code:`run.sh`, please refer to the `command line
arguments <../../ui/index.html#command-line-argument>`_ page. The short description of these arguments is shown as follow.
Each command line argument in :code:`run.sh`, please refer to the :ref:`cmd_line_index` page. The short description of these arguments is shown as follow.

* config\: Tell paddle which file is neural network configuration.
* save_dir\: Tell paddle save model into './output'
Expand Down