提交 0ed23581 编写于 作者: Y Yu Yang

Merge branch 'develop' of github.com:baidu/Paddle into feature/refine_doc_drnn

...@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8)
project(paddle CXX C) project(paddle CXX C)
set(PADDLE_MAJOR_VERSION 0) set(PADDLE_MAJOR_VERSION 0)
set(PADDLE_MINOR_VERSION 8) set(PADDLE_MINOR_VERSION 9)
set(PADDLE_PATCH_VERSION 0b3) set(PADDLE_PATCH_VERSION 0a0)
set(PADDLE_VERSION ${PADDLE_MAJOR_VERSION}.${PADDLE_MINOR_VERSION}.${PADDLE_PATCH_VERSION}) set(PADDLE_VERSION ${PADDLE_MAJOR_VERSION}.${PADDLE_MINOR_VERSION}.${PADDLE_PATCH_VERSION})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
......
...@@ -14,7 +14,7 @@ developed by Baidu scientists and engineers for the purpose of applying deep ...@@ -14,7 +14,7 @@ developed by Baidu scientists and engineers for the purpose of applying deep
learning to many products at Baidu. learning to many products at Baidu.
Our vision is to enable deep learning for everyone via PaddlePaddle. Our vision is to enable deep learning for everyone via PaddlePaddle.
Please refer to our [release announcement](https://github.com/baidu/Paddle/releases) to track the latest feature of PaddlePaddle. Please refer to our [release announcement](https://github.com/baidu/Paddle/releases) to track the latest feature of PaddlePaddle.
## Features ## Features
...@@ -26,15 +26,15 @@ Please refer to our [release announcement](https://github.com/baidu/Paddle/relea ...@@ -26,15 +26,15 @@ Please refer to our [release announcement](https://github.com/baidu/Paddle/relea
connection. connection.
- **Efficiency** - **Efficiency**
In order to unleash the power of heterogeneous computing resource, In order to unleash the power of heterogeneous computing resource,
optimization occurs at different levels of PaddlePaddle, including optimization occurs at different levels of PaddlePaddle, including
computing, memory, architecture and communication. The following are some computing, memory, architecture and communication. The following are some
examples: examples:
- Optimized math operations through SSE/AVX intrinsics, BLAS libraries - Optimized math operations through SSE/AVX intrinsics, BLAS libraries
(e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels. (e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels.
- Highly optimized recurrent networks which can handle **variable-length** - Highly optimized recurrent networks which can handle **variable-length**
sequence without padding. sequence without padding.
- Optimized local and distributed training for models with high dimensional - Optimized local and distributed training for models with high dimensional
sparse data. sparse data.
...@@ -57,41 +57,39 @@ Please refer to our [release announcement](https://github.com/baidu/Paddle/relea ...@@ -57,41 +57,39 @@ Please refer to our [release announcement](https://github.com/baidu/Paddle/relea
## Installation ## Installation
Check out the [Install Guide](http://paddlepaddle.org/doc/build/) to install from Check out the [Install Guide](http://paddlepaddle.org/doc/build/) to install from
pre-built packages (**docker image**, **deb package**) or pre-built packages (**docker image**, **deb package**) or
directly build on **Linux** and **Mac OS X** from the source code. directly build on **Linux** and **Mac OS X** from the source code.
## Documentation ## Documentation
Both [English Docs](http://paddlepaddle.org/doc/) and [Chinese Docs](http://paddlepaddle.org/doc_cn/) are provided for our users and developers. Both [English Docs](http://paddlepaddle.org/doc/) and [Chinese Docs](http://paddlepaddle.org/doc_cn/) are provided for our users and developers.
- [Quick Start](http://paddlepaddle.org/doc/demo/quick_start/index_en) <br> - [Quick Start](http://paddlepaddle.org/doc/demo/quick_start/index_en) <br>
You can follow the quick start tutorial to learn how use PaddlePaddle You can follow the quick start tutorial to learn how use PaddlePaddle
step-by-step. step-by-step.
- [Example and Demo](http://paddlepaddle.org/doc/demo/) <br> - [Example and Demo](http://paddlepaddle.org/doc/demo/) <br>
We provide five demos, including: image classification, sentiment analysis, We provide five demos, including: image classification, sentiment analysis,
sequence to sequence model, recommendation, semantic role labeling. sequence to sequence model, recommendation, semantic role labeling.
- [Distributed Training](http://paddlepaddle.org/doc/cluster) <br> - [Distributed Training](http://paddlepaddle.org/doc/cluster) <br>
This system supports training deep learning models on multiple machines This system supports training deep learning models on multiple machines
with data parallelism. with data parallelism.
- [Python API](http://paddlepaddle.org/doc/ui/) <br> - [Python API](http://paddlepaddle.org/doc/ui/) <br>
PaddlePaddle supports using either Python interface or C++ to build your PaddlePaddle supports using either Python interface or C++ to build your
system. We also use SWIG to wrap C++ source code to create a user friendly system. We also use SWIG to wrap C++ source code to create a user friendly
interface for Python. You can also use SWIG to create interface for your interface for Python. You can also use SWIG to create interface for your
favorite programming language. favorite programming language.
- [How to Contribute](http://paddlepaddle.org/doc/build/contribute_to_paddle.html) <br> - [How to Contribute](http://paddlepaddle.org/doc/build/contribute_to_paddle.html) <br>
We sincerely appreciate your interest and contributions. If you would like to We sincerely appreciate your interest and contributions. If you would like to
contribute, please read the contribution guide. contribute, please read the contribution guide.
- [Source Code Documents](http://paddlepaddle.org/doc/source/) <br> - [Source Code Documents](http://paddlepaddle.org/doc/source/) <br>
## Ask Questions ## Ask Questions
Please join the [**gitter chat**](https://gitter.im/PaddlePaddle/Deep_Learning) or send email to
**paddle-dev@baidu.com** to ask questions and talk about methods and models. You are welcome to submit questions and bug reports as [Github Issues](https://github.com/baidu/paddle/issues).
Framework development discussions and
bug reports are collected on [Issues](https://github.com/baidu/paddle/issues).
## Copyright and License ## Copyright and License
PaddlePaddle is provided under the [Apache-2.0 license](LICENSE). PaddlePaddle is provided under the [Apache-2.0 license](LICENSE).
...@@ -29,6 +29,7 @@ settings( ...@@ -29,6 +29,7 @@ settings(
batch_size=128, batch_size=128,
learning_rate=2e-3, learning_rate=2e-3,
learning_method=AdamOptimizer(), learning_method=AdamOptimizer(),
average_window=0.5,
regularization=L2Regularization(8e-4), regularization=L2Regularization(8e-4),
gradient_clipping_threshold=25) gradient_clipping_threshold=25)
......
...@@ -17,7 +17,7 @@ PaddlePaddle does not need any preprocessing to sequence data, such as padding. ...@@ -17,7 +17,7 @@ PaddlePaddle does not need any preprocessing to sequence data, such as padding.
.. code-block:: python .. code-block:: python
settings.slots = [ settings.input_types = [
integer_value_sequence(len(settings.src_dict)), integer_value_sequence(len(settings.src_dict)),
integer_value_sequence(len(settings.trg_dict)), integer_value_sequence(len(settings.trg_dict)),
integer_value_sequence(len(settings.trg_dict))] integer_value_sequence(len(settings.trg_dict))]
......
...@@ -6,7 +6,7 @@ Sentiment analysis is also used to monitor social media based on large amount of ...@@ -6,7 +6,7 @@ Sentiment analysis is also used to monitor social media based on large amount of
On the other hand, grabbing the user comments of products and analyzing their sentiment are useful to understand user preferences for companies, products, even competing products. On the other hand, grabbing the user comments of products and analyzing their sentiment are useful to understand user preferences for companies, products, even competing products.
This tutorial will guide you through the process of training a Long Short Term Memory (LSTM) Network to classify the sentiment of sentences from [Large Movie Review Dataset](http://ai.stanford.edu/~amaas/data/sentiment/), sometimes known as the [Internet Movie Database (IMDB)](http://ai.stanford.edu/~amaas/papers/wvSent_acl2011.pdf). This dataset contains movie reviews along with their associated binary sentiment polarity labels, namely positive and negative. So randomly guessing yields 50% accuracy. This tutorial will guide you through the process of training a Long Short Term Memory (LSTM) Network to classify the sentiment of sentences from [Large Movie Review Dataset](http://ai.stanford.edu/~amaas/data/sentiment/), sometimes known as the Internet Movie Database (IMDB). This dataset contains movie reviews along with their associated binary sentiment polarity labels, namely positive and negative. So randomly guessing yields 50% accuracy.
## Data Preparation ## Data Preparation
...@@ -39,7 +39,7 @@ imdbEr.txt imdb.vocab README test train ...@@ -39,7 +39,7 @@ imdbEr.txt imdb.vocab README test train
* imdbEr.txt: expected rating for each token in imdb.vocab. * imdbEr.txt: expected rating for each token in imdb.vocab.
* README: data documentation. * README: data documentation.
Both train and test set directory contains: The file in train set directory is as follows. The test set also contains them except `unsup` and `urls_unsup.txt`.
``` ```
labeledBow.feat neg pos unsup unsupBow.feat urls_neg.txt urls_pos.txt urls_unsup.txt labeledBow.feat neg pos unsup unsupBow.feat urls_neg.txt urls_pos.txt urls_unsup.txt
...@@ -151,6 +151,7 @@ settings( ...@@ -151,6 +151,7 @@ settings(
batch_size=128, batch_size=128,
learning_rate=2e-3, learning_rate=2e-3,
learning_method=AdamOptimizer(), learning_method=AdamOptimizer(),
average_window=0.5,
regularization=L2Regularization(8e-4), regularization=L2Regularization(8e-4),
gradient_clipping_threshold=25 gradient_clipping_threshold=25
) )
...@@ -163,17 +164,18 @@ stacked_lstm_net(dict_dim, class_dim=class_dim, ...@@ -163,17 +164,18 @@ stacked_lstm_net(dict_dim, class_dim=class_dim,
* **Data Definition**: * **Data Definition**:
* get\_config\_arg(): get arguments setted by `--config_args=xx` in commandline argument. * get\_config\_arg(): get arguments setted by `--config_args=xx` in commandline argument.
* Define TrainData and TestData provider, here using Python interface (PyDataProviderWrapper) of PaddlePaddle to load data. For details, you can refer to the document of PyDataProvider. * Define data provider, here using Python interface to load data. For details, you can refer to the document of PyDataProvider2.
* **Algorithm Configuration**: * **Algorithm Configuration**:
* use sgd algorithm.
* use adam optimization.
* set batch size of 128. * set batch size of 128.
* set average sgd window.
* set global learning rate. * set global learning rate.
* use adam optimization.
* set average sgd window.
* set L2 regularization.
* set gradient clipping threshold.
* **Network Configuration**: * **Network Configuration**:
* dict_dim: get dictionary dimension. * dict_dim: dictionary dimension.
* class_dim: set category number, IMDB has two label, namely positive and negative label. * class_dim: category number, IMDB has two label, namely positive and negative label.
* `stacked_lstm_net`: predefined network as shown in Figure 3, use this network by default. * `stacked_lstm_net`: predefined network as shown in Figure 3, use this network by default.
* `bidirectional_lstm_net`: predefined network as shown in Figure 2. * `bidirectional_lstm_net`: predefined network as shown in Figure 2.
......
...@@ -60,7 +60,7 @@ Implement C++ Class ...@@ -60,7 +60,7 @@ Implement C++ Class
The C++ class of the layer implements the initialization, forward, and backward part of the layer. The fully connected layer is at :code:`paddle/gserver/layers/FullyConnectedLayer.h` and :code:`paddle/gserver/layers/FullyConnectedLayer.cpp`. We list simplified version of the code below. The C++ class of the layer implements the initialization, forward, and backward part of the layer. The fully connected layer is at :code:`paddle/gserver/layers/FullyConnectedLayer.h` and :code:`paddle/gserver/layers/FullyConnectedLayer.cpp`. We list simplified version of the code below.
It needs to derive the base class :code:`paddle::BaseLayer`, and it needs to override the following functions: It needs to derive the base class :code:`paddle::Layer`, and it needs to override the following functions:
- constructor and destructor. - constructor and destructor.
- :code:`init` function. It is used to initialize the parameters and settings. - :code:`init` function. It is used to initialize the parameters and settings.
......
API API
======== ===
.. doxygenfile:: paddle/api/PaddleAPI.h .. doxygenfile:: paddle/api/PaddleAPI.h
.. doxygenfile:: paddle/api/Internal.h .. doxygenfile:: paddle/api/Internal.h
CUDA
====================
.. toctree::
:maxdepth: 3
cuda.rst
Matrix CUDA
==================== ====
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 2
matrix.rst matrix.rst
nn.rst
utils.rst
Matrix Matrix
======= ======
Base Matrix Base
------------- ----
hl_matrix.h hl_matrix.h
`````````````````` ```````````
.. doxygenfile:: paddle/cuda/include/hl_matrix.h .. doxygenfile:: paddle/cuda/include/hl_matrix.h
hl_matrix_base.h hl_matrix_base.h
`````````````````` ````````````````
.. doxygenfile:: paddle/cuda/include/hl_matrix_base.cuh .. doxygenfile:: paddle/cuda/include/hl_matrix_base.cuh
hl_matrix_apply.cuh hl_matrix_apply.cuh
`````````````````````` ```````````````````
.. doxygenfile:: paddle/cuda/include/hl_matrix_apply.cuh .. doxygenfile:: paddle/cuda/include/hl_matrix_apply.cuh
hl_matrix_ops.cuh hl_matrix_ops.cuh
`````````````````````` `````````````````
.. doxygenfile:: paddle/cuda/include/hl_matrix_ops.cuh .. doxygenfile:: paddle/cuda/include/hl_matrix_ops.cuh
hl_matrix_type.cuh hl_matrix_type.cuh
`````````````````````` ``````````````````
.. doxygenfile:: paddle/cuda/include/hl_matrix_type.cuh .. doxygenfile:: paddle/cuda/include/hl_matrix_type.cuh
hl_sse_matrix_kernel.cuh hl_sse_matrix_kernel.cuh
`````````````````````````` ````````````````````````
.. doxygenfile:: paddle/cuda/include/hl_sse_matrix_kernel.cuh .. doxygenfile:: paddle/cuda/include/hl_sse_matrix_kernel.cuh
Matrix Function
---------------
hl_batch_transpose.h hl_batch_transpose.h
`````````````````````````` ````````````````````
.. doxygenfile:: paddle/cuda/include/hl_batch_transpose.h .. doxygenfile:: paddle/cuda/include/hl_batch_transpose.h
Sparse Matrix
--------------
hl_sparse.h
``````````````````
.. doxygenfile:: paddle/cuda/include/hl_sparse.h
hl_sparse.ph
``````````````````````
.. doxygenfile:: paddle/cuda/include/hl_sparse.ph
Others
---------------
hl_aggregate.h hl_aggregate.h
`````````````````` ``````````````
.. doxygenfile:: paddle/cuda/include/hl_aggregate.h .. doxygenfile:: paddle/cuda/include/hl_aggregate.h
hl_top_k.h
``````````
.. doxygenfile:: paddle/cuda/include/hl_top_k.h
hl_table_apply.h hl_table_apply.h
`````````````````` ````````````````
.. doxygenfile:: paddle/cuda/include/hl_table_apply.h .. doxygenfile:: paddle/cuda/include/hl_table_apply.h
hl_top_k.h Sparse Matrix
`````````````````` -------------
.. doxygenfile:: paddle/cuda/include/hl_top_k.h
hl_sparse.h
```````````
.. doxygenfile:: paddle/cuda/include/hl_sparse.h
hl_sparse.ph
````````````
.. doxygenfile:: paddle/cuda/include/hl_sparse.ph
Neural Networks Neural Network
================== ==============
Base Base
------- ----
.. doxygenfile:: paddle/cuda/include/hl_gpu.h .. doxygenfile:: paddle/cuda/include/hl_gpu.h
.. doxygenfile:: paddle/cuda/include/hl_cnn.h
.. doxygenfile:: paddle/cuda/include/hl_functions.h .. doxygenfile:: paddle/cuda/include/hl_functions.h
.. doxygenfile:: paddle/cuda/include/hl_avx_functions.h .. doxygenfile:: paddle/cuda/include/hl_avx_functions.h
.. doxygenfile:: paddle/cuda/include/hl_device_functions.cuh
.. doxygenfile:: paddle/cuda/include/hl_gpu_functions.cuh .. doxygenfile:: paddle/cuda/include/hl_gpu_functions.cuh
Activation Functions
-----------------------
.. doxygenfile:: paddle/cuda/include/hl_activation_functions.h .. doxygenfile:: paddle/cuda/include/hl_activation_functions.h
CNN Related APIs
----------------
.. doxygenfile:: paddle/cuda/include/hl_cnn.h
.. doxygenfile:: paddle/cuda/include/hl_cuda_cudnn.h
.. doxygenfile:: paddle/cuda/include/hl_cuda_cudnn.ph
RNN Related APIs RNN Related APIs
----------------- ----------------
.. doxygenfile:: paddle/cuda/include/hl_recurrent_apply.cuh .. doxygenfile:: paddle/cuda/include/hl_recurrent_apply.cuh
.. doxygenfile:: paddle/cuda/include/hl_sequence.h .. doxygenfile:: paddle/cuda/include/hl_sequence.h
LSTM Model LSTM Model
`````````````` ``````````
.. doxygenfile:: paddle/cuda/include/hl_lstm.h .. doxygenfile:: paddle/cuda/include/hl_lstm.h
.. dpxygenfile:: paddle/cuda/include/hl_cpu_lstm.cuh .. dpxygenfile:: paddle/cuda/include/hl_cpu_lstm.cuh
.. doxygenfile:: paddle/cuda/include/hl_gpu_lstm.cuh .. doxygenfile:: paddle/cuda/include/hl_gpu_lstm.cuh
.. doxygenfile:: paddle/cuda/include/hl_lstm_ops.cuh .. doxygenfile:: paddle/cuda/include/hl_lstm_ops.cuh
GRU Model GRU Model
```````````````` `````````
.. doxygenfile:: paddle/cuda/include/hl_gru_ops.cuh .. doxygenfile:: paddle/cuda/include/hl_gru_ops.cuh
.. doxygenfile:: paddle/cuda/include/hl_cpu_gru.cuh .. doxygenfile:: paddle/cuda/include/hl_cpu_gru.cuh
.. doxygenfile:: paddle/cuda/include/hl_gpu_gru.cuh .. doxygenfile:: paddle/cuda/include/hl_gpu_gru.cuh
RNN
====================
.. toctree::
:maxdepth: 3
rnn.rst
Cuda Utils
============= =====
Dynamic Link Libs Dynamic Link Libs
-------------------------- -----------------
hl_dso_loader.h
``````````````````
.. doxygenfile:: paddle/cuda/include/hl_dso_loader.h .. doxygenfile:: paddle/cuda/include/hl_dso_loader.h
GPU Resources GPU Resources
---------------- -------------
hl_cuda.ph hl_cuda.ph
`````````````` ``````````
.. doxygenfile:: paddle/cuda/include/hl_cuda.ph .. doxygenfile:: paddle/cuda/include/hl_cuda.ph
hl_cuda.h hl_cuda.h
`````````````` `````````
.. doxygenfile:: paddle/cuda/include/hl_cuda.h .. doxygenfile:: paddle/cuda/include/hl_cuda.h
CUDA Wrapper HPPL Base
-------------- ---------
.. doxygenfile:: paddle/cuda/include/hl_base.h
hl_cuda_cublas.h CUBLAS Wrapper
`````````````````````` --------------
.. doxygenfile:: paddle/cuda/include/hl_cuda_cublas.h .. doxygenfile:: paddle/cuda/include/hl_cuda_cublas.h
hl_cuda_cudnn.h Timer
`````````````````````` -----
.. doxygenfile:: paddle/cuda/include/hl_cuda_cudnn.h .. doxygenfile:: paddle/cuda/include/hl_time.h
hl_cuda_cudnn.h
``````````````````````
.. doxygenfile:: paddle/cuda/include/hl_cuda_cudnn.ph
Thread Resource
---------------
.. doxygenfile:: paddle/cuda/include/hl_thread.ph
Device Function
---------------
.. doxygenfile:: paddle/cuda/include/hl_device_functions.cuh
Utils
====================
.. toctree::
:maxdepth: 3
utils.rst
Utilities
===========
HPPL Base
------------
hl_base.h
``````````````
.. doxygenfile:: paddle/cuda/include/hl_base.h
Timer
-----------
hl_time.h
``````````````
.. doxygenfile:: paddle/cuda/include/hl_time.h
Thread Resource
-----------
hl_thread.ph
``````````````
.. doxygenfile:: paddle/cuda/include/hl_thread.ph
Activations Activations
============= ===========
.. doxygenclass:: paddle::ActivationFunction .. doxygenclass:: paddle::ActivationFunction
:members: :members:
Data Providers Documents
==========================
.. toctree::
:maxdepth: 3
dataproviders.rst
==============
Data Providers Data Providers
================ ==============
Base DataProvider DataProviders
------------------ =============
Base
----
.. doxygenclass:: paddle::DataProvider .. doxygenclass:: paddle::DataProvider
:members: :members:
DataProviderGroup DataProviderGroup
------------------- -----------------
.. doxygenclass:: paddle::DataProviderGroup .. doxygenclass:: paddle::DataProviderGroup
:members: :members:
MultiDataProvider MultiDataProvider
------------------- -----------------
.. doxygenclass:: paddle::MultiDataProvider .. doxygenclass:: paddle::MultiDataProvider
:members: :members:
PyDataProvider PyDataProvider
=================== ==============
IFieldScanner IFieldScanner
------------- -------------
...@@ -45,7 +49,7 @@ SparseValueScanner ...@@ -45,7 +49,7 @@ SparseValueScanner
:members: :members:
SequenceScanner SequenceScanner
------------------ ---------------
.. doxygenclass:: paddle::SparseValueScanner .. doxygenclass:: paddle::SparseValueScanner
:members: :members:
...@@ -69,8 +73,8 @@ IPyDataProvider ...@@ -69,8 +73,8 @@ IPyDataProvider
.. doxygenclass:: paddle::PyDataProvider2 .. doxygenclass:: paddle::PyDataProvider2
:members: :members:
Proto Data Provider ProtoDataProvider
=================== =================
ProtoDataProvider ProtoDataProvider
---------------- ----------------
...@@ -78,6 +82,6 @@ ProtoDataProvider ...@@ -78,6 +82,6 @@ ProtoDataProvider
:members: :members:
ProtoSequenceDataProvider ProtoSequenceDataProvider
---------------- -------------------------
.. doxygenclass:: paddle::ProtoSequenceDataProvider .. doxygenclass:: paddle::ProtoSequenceDataProvider
:members: :members:
Base Evaluator ==========
============== Evaluators
==========
Base
====
Evaluator
---------
.. doxygenclass:: paddle::Evaluator .. doxygenclass:: paddle::Evaluator
:members: :members:
Sum
Utils ===
=====
SumEvaluator SumEvaluator
------------ ------------
......
Evaluators
==========
.. toctree::
:maxdepth: 3
evaluators.rst
Gradient Machines Gradient Machines
================ =================
GradientMachine GradientMachine
--------------------- ---------------
.. doxygenclass:: paddle::GradientMachine .. doxygenclass:: paddle::GradientMachine
:members: :members:
GradientMachineModel GradientMachineMode
-------------------- -------------------
.. doxygenclass:: paddle::IGradientMachineMode .. doxygenclass:: paddle::IGradientMachineMode
:members: :members:
MultiGradientMachine MultiGradientMachine
--------------------- --------------------
.. doxygenclass:: paddle::MultiGradientMachine .. doxygenclass:: paddle::MultiGradientMachine
:members: :members:
...@@ -21,20 +21,7 @@ TrainerThread ...@@ -21,20 +21,7 @@ TrainerThread
.. doxygenclass:: paddle::TrainerThread .. doxygenclass:: paddle::TrainerThread
:members: :members:
Recurrent Gradient Machines RecurrentGradientMachine
--------------------------- ------------------------
.. doxygenclass:: paddle::RecurrentGradientMachine .. doxygenclass:: paddle::RecurrentGradientMachine
:members: :members:
Networks
========
NeuralNetwork
-------------
.. doxygenclass:: paddle::NeuralNetwork
:members:
ParallelNeuralNetwork
---------------------
.. doxygenclass:: paddle::ParallelNeuralNetwork
:members:
Gradient Machines Documents
=============================
.. toctree::
:maxdepth: 3
gradientmachines.rst
GServer
=======
.. toctree::
:maxdepth: 2
activations.rst
dataproviders.rst
evaluators.rst
gradientmachines.rst
layers.rst
neworks.rst
Base ======
Layers
====== ======
Base
====
Layer Layer
----- -----
.. doxygenclass:: paddle::Layer .. doxygenclass:: paddle::Layer
...@@ -17,7 +21,7 @@ Operator ...@@ -17,7 +21,7 @@ Operator
:members: :members:
Data Layer Data Layer
=========== ==========
.. doxygenclass:: paddle::DataLayer .. doxygenclass:: paddle::DataLayer
:members: :members:
...@@ -58,6 +62,11 @@ CudnnConvLayer ...@@ -58,6 +62,11 @@ CudnnConvLayer
.. doxygenclass:: paddle::CudnnConvLayer .. doxygenclass:: paddle::CudnnConvLayer
:members: :members:
ExpandConvBaseLayer
-------------------
.. doxygenclass:: paddle::ExpandConvBaseLayer
:members:
ExpandConvLayer ExpandConvLayer
--------------- ---------------
.. doxygenclass:: paddle::ExpandConvLayer .. doxygenclass:: paddle::ExpandConvLayer
...@@ -86,6 +95,16 @@ CudnnPoolLayer ...@@ -86,6 +95,16 @@ CudnnPoolLayer
.. doxygenclass:: paddle::CudnnPoolLayer .. doxygenclass:: paddle::CudnnPoolLayer
:members: :members:
SpatialPyramidPoolLayer
-----------------------
.. doxygenclass:: paddle::SpatialPyramidPoolLayer
:members:
MaxOutLayer
-----------
.. doxygenclass:: paddle::MaxOutLayer
:members:
Norm Layers Norm Layers
=========== ===========
...@@ -402,6 +421,11 @@ TransLayer ...@@ -402,6 +421,11 @@ TransLayer
Sampling Layers Sampling Layers
=============== ===============
BilinearInterpLayer
-------------------
.. doxygenclass:: paddle::BilinearInterpLayer
:members:
MultinomialSampler MultinomialSampler
------------------ ------------------
.. doxygenclass:: paddle::MultinomialSampler .. doxygenclass:: paddle::MultinomialSampler
......
Layers Documents
====================
.. toctree::
:maxdepth: 3
layer.rst
Networks
========
NeuralNetwork
-------------
.. doxygenclass:: paddle::NeuralNetwork
:members:
ParallelNeuralNetwork
---------------------
.. doxygenclass:: paddle::ParallelNeuralNetwork
:members:
# Source Code Documents
## cuda
- [CUDA](cuda/cuda/index.rst)
- [Matrix](cuda/matrix/index.rst)
- [RNN](cuda/rnn/index.rst)
- [Utils](cuda/utils/index.rst)
## gserver
- [Activations](gserver/activations/index.rst)
- [Data Providers](gserver/dataprovider/index.rst)
- [Evaluators](gserver/evaluators/index.rst)
- [Gradient Machines](gserver/gradientmachines/index.rst)
- [Layers](gserver/layers/index.rst)
## math
- [Matrix](math/matrix/index.rst)
- [Utils](math/utils/index.rst)
## parameter
- [Parameter](parameter/parameter/index.rst)
- [Update](parameter/update/index.rst)
- [Optimizer](parameter/optimizer/index.rst)
## pserver
- [Client](pserver/client/index.rst)
- [Network](pserver/network/index.rst)
- [Server](pserver/server/index.rst)
## trainer
- [Trainer](trainer/trainer.rst)
## api
- [API](api/api.rst)
## utils
- [CustomStackTrace](utils/customStackTrace.rst)
- [Enumeration wrapper](utils/enum.rst)
- [Lock](utils/lock.rst)
- [Queue](utils/queue.rst)
- [Thread](utils/thread.rst)
Source Code Documents
=====================
.. toctree::
:maxdepth: 1
gserver/index.rst
trainer.rst
parameter/index.rst
pserver/index.rst
api.rst
cuda/index.rst
math/index.rst
utils/index.rst
Functions
=========
MathFunctions
-------------
.. doxygenfile:: paddle/math/MathFunctions.h
SIMDFunctions
-------------
.. doxygenfile:: paddle/math/SIMDFunctions.h
Math
====
.. toctree::
:maxdepth: 2
vector.rst
matrix.rst
functions.rst
utils.rst
Matrix
======
Base
----
BaseMatrix Template
```````````````````
.. doxygenclass:: paddle::BaseMatrixT
:members:
Matrix
``````
.. doxygenclass:: paddle::Matrix
:members:
MatrixOffset
````````````
.. doxygenclass:: paddle::MatrixOffset
:members:
CpuMatrix
---------
CpuMatrix
`````````
.. doxygenclass:: paddle::CpuMatrix
:members:
SharedCpuMatrix
```````````````
.. doxygenclass:: paddle::SharedCpuMatrix
:members:
GpuMatrix
---------
.. doxygenclass:: paddle::GpuMatrix
:members:
CpuSparseMatrix
---------------
CpuSparseMatrix
```````````````
.. doxygenclass:: paddle::CpuSparseMatrix
:members:
SparseRowCpuMatrix
``````````````````
.. doxygenclass:: paddle::SparseRowCpuMatrix
:members:
SparseAutoGrowRowCpuMatrix
``````````````````````````
.. doxygenclass:: paddle::SparseAutoGrowRowCpuMatrix
:members:
SparsePrefetchRowCpuMatrix
``````````````````````````
.. doxygenclass:: paddle::SparsePrefetchRowCpuMatrix
:members:
SparseRowIdsCpuMatrix
`````````````````````
.. doxygenclass:: paddle::SparseRowIdsCpuMatrix
:members:
CacheRowCpuMatrix
`````````````````
.. doxygenclass:: paddle::CacheRowCpuMatrix
:members:
GpuSparseMatrix
---------------
.. doxygenclass:: paddle::GpuSparseMatrix
:members:
Matrix Documents
====================
.. toctree::
:maxdepth: 3
matrix.rst
Matrix
=======
Base
--------
.. doxygenfile:: paddle/math/BaseMatrix.h
Sparse Matrix
----------------
.. doxygenfile:: paddle/math/Matrix.h
.. doxygenfile:: paddle/math/Vector.h
.. doxygenfile:: paddle/math/MathUtils.h
.. doxygenfile:: paddle/math/SparseMatrix.h
.. doxygenfile:: paddle/math/SparseRowMatrix.h
.. doxygenfile:: paddle/math/CpuSparseMatrix.h
Others
----------
.. doxygenfile:: paddle/math/MathFunctions.h
.. doxygenfile:: paddle/math/SIMDFunctions.h
Utils Memory Manager
======= ==============
Memory Handle Memory Handle
-------------- -------------
.. doxygenfile:: paddle/math/MemoryHandle.h .. doxygenfile:: paddle/math/MemoryHandle.h
Allocator
---------
.. doxygenfile:: paddle/math/Allocator.h .. doxygenfile:: paddle/math/Allocator.h
PoolAllocator
`````````````
.. doxygenfile:: paddle/math/PoolAllocator.h .. doxygenfile:: paddle/math/PoolAllocator.h
Storage
-------
.. doxygenfile:: paddle/math/Storage.h .. doxygenfile:: paddle/math/Storage.h
Utils Documents
====================
.. toctree::
:maxdepth: 3
utils.rst
Vector
======
BaseVector
``````````
.. doxygenclass:: paddle::BaseVector
:members:
Vector Template
```````````````
.. doxygenclass:: paddle::VectorT
:members:
CpuVector Template
``````````````````
.. doxygenclass:: paddle::CpuVectorT
:members:
GpuVector Template
``````````````````
.. doxygenclass:: paddle::GpuVectorT
:members:
ParallelCpuVector Template
``````````````````````````
.. doxygenclass:: paddle::ParallelCpuVectorT
:members:
ParallelGpuVector Template
``````````````````````````
.. doxygenclass:: paddle::ParallelGpuVectorT
:members:
CpuGpuVector Template
`````````````````````
.. doxygenclass:: paddle::CpuGpuVectorT
:members:
Parameter Documents Parameter
==================== =========
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 2
parameter.rst
optimizer.rst optimizer.rst
updater.rst
Optimizer Optimizer
============ =========
ParameterOptimizer
------------------
.. doxygenfile:: paddle/parameter/ParameterOptimizer.h
Regularizer
-----------
.. doxygenfile:: paddle/parameter/Regularizer.h
FirstOrderOptimizer
-------------------
.. doxygenfile:: paddle/parameter/FirstOrderOptimizer.h .. doxygenfile:: paddle/parameter/FirstOrderOptimizer.h
AverageOptimizer
----------------
.. doxygenfile:: paddle/parameter/AverageOptimizer.h .. doxygenfile:: paddle/parameter/AverageOptimizer.h
.. doxygenfile:: paddle/parameter/ParameterOptimizer.h
OptimizerWithRegularizer
------------------------
.. doxygenfile:: paddle/parameter/OptimizerWithRegularizer.h .. doxygenfile:: paddle/parameter/OptimizerWithRegularizer.h
Parameter Parameter
============= =========
Weight
--------
.. doxygenfile:: paddle/parameter/Weight.h
Regularizer
------------
.. doxygenfile:: paddle/parameter/Regularizer.h
Parameter Parameter
------------- ---------
.. doxygenfile:: paddle/parameter/Argument.h .. doxygenfile:: paddle/parameter/Argument.h
.. doxygenfile:: paddle/parameter/Parameter.h .. doxygenfile:: paddle/parameter/Parameter.h
.. doxygenfile:: paddle/parameter/ParallelParameter.h .. doxygenfile:: paddle/parameter/ParallelParameter.h
Weight
------
.. doxygenfile:: paddle/parameter/Weight.h
Parameter Documents
====================
.. toctree::
:maxdepth: 3
parameter.rst
Parameter Documents
====================
.. toctree::
:maxdepth: 3
update.rst
Update Updater
========== =======
Base
----
.. doxygenfile:: paddle/parameter/ParameterUpdaterBase.h .. doxygenfile:: paddle/parameter/ParameterUpdaterBase.h
Hook
----
.. doxygenfile:: paddle/parameter/ParameterUpdaterHook.h .. doxygenfile:: paddle/parameter/ParameterUpdaterHook.h
.. doxygenfile:: paddle/parameter/ParameterUpdateFunctions.h
Functions
---------
.. doxygenfile:: paddle/parameter/ParameterUpdateFunctions.h
Client
======
BaseClient
----------
.. doxygenclass:: paddle::BaseClient
:members:
ParameterClient2
----------------
.. doxygenclass:: paddle::ParameterClient2
:members:
Client
=========
.. doxygenclass:: paddle::BaseClient
:members:
:protected-members:
:private-members:
:undoc-members:
.. doxygenclass:: paddle::ParameterClient2
:members:
:protected-members:
:private-members:
:undoc-members:
Client Documents
====================
.. toctree::
:maxdepth: 3
client.rst
PServer
=======
.. toctree::
:maxdepth: 2
client.rst
network.rst
server.rst
utils.rst
Network
=======
SocketServer
------------
.. doxygenclass:: paddle::SocketServer
:members:
SocketWorker
------------
.. doxygenclass:: paddle::SocketWorker
:members:
SocketClient
------------
.. doxygenclass:: paddle::SocketClient
:members:
SocketChannel
-------------
.. doxygenclass:: paddle::SocketChannel
:members:
MessageReader
-------------
.. doxygenclass:: paddle::MsgReader
:members:
Network Documents
====================
.. toctree::
:maxdepth: 3
network.rst
Network
==========
Socket Server
----------------
.. doxygenclass:: paddle::SocketServer
:members:
:protected-members:
:private-members:
:undoc-members:
Socket Worker
----------------
.. doxygenclass:: paddle::SocketWorker
:members:
:protected-members:
:private-members:
:undoc-members:
Socket Client
----------------
.. doxygenclass:: paddle::SocketClient
:members:
:protected-members:
:private-members:
:undoc-members:
Socket Channel
---------------
.. doxygenclass:: paddle::SocketChannel
:members:
:protected-members:
:private-members:
:undoc-members:
Message Reader
---------------
.. doxygenclass:: paddle::MsgReader
:members:
:protected-members:
:private-members:
:undoc-members:
Server
======
ProtoServer
-----------
.. doxygenclass:: paddle::ProtoServer
:members:
ParameterServer2
----------------
.. doxygenclass:: paddle::ParameterServer2
:members:
Server Documents
====================
.. toctree::
:maxdepth: 3
server.rst
Server
==========
.. doxygenclass:: paddle::ProtoServer
:members:
:protected-members:
:private-members:
:undoc-members:
.. doxygenclass:: paddle::ParameterServer2
:members:
:protected-members:
:private-members:
:undoc-members:
...@@ -14,7 +14,7 @@ RemoteParameterUpdater ...@@ -14,7 +14,7 @@ RemoteParameterUpdater
:members: :members:
ConcurrentRemoteParameterUpdater ConcurrentRemoteParameterUpdater
--------------------------------- --------------------------------
.. doxygenclass:: paddle::ConcurrentRemoteParameterUpdater .. doxygenclass:: paddle::ConcurrentRemoteParameterUpdater
:members: :members:
......
CustomStackTrace CustomStackTrace
================ ================
class CustomStackTrace
----------------------
.. doxygenclass:: paddle::CustomStackTrace .. doxygenclass:: paddle::CustomStackTrace
:members: :members:
enumeration_wrapper Enumeration wrapper
=================== ===================
namespace paddle::enumeration_wrapper
-------------------------------------
.. doxygennamespace:: paddle::enumeration_wrapper .. doxygennamespace:: paddle::enumeration_wrapper
Utils
=====
.. toctree::
:maxdepth: 2
lock.rst
queue.rst
thread.rst
customStackTrace.rst
enum.rst
Thread Lock
====== ====
RWLock
class Thread ------
------------ .. doxygenclass:: paddle::RWLock
.. doxygenclass:: paddle::Thread
:members: :members:
ReadLockGuard
class ThreadWorker -------------
------------------ .. doxygenclass:: paddle::ReadLockGuard
.. doxygenclass:: paddle::ThreadWorker
:members: :members:
class SyncThreadPool SpinLock
-------------------- --------
.. doxygenclass:: paddle::SpinLock
.. doxygenclass:: paddle::SyncThreadPool
:members: :members:
class MultiThreadWorker
-----------------------
.. doxygenclass:: paddle::MultiThreadWorker Semaphore
---------
.. doxygenclass:: paddle::Semaphore
:members: :members:
class AsyncThreadPool ThreadBarrier
--------------------- -------------
.. doxygenclass:: paddle::ThreadBarrier
:members:
.. doxygenclass:: paddle::AsyncThreadPool LockedCondition
---------------
.. doxygenclass:: paddle::LockedCondition
:members: :members:
Queue Queue
===== =====
Queue
class Queue -----
------------
.. doxygenclass:: paddle::Queue .. doxygenclass:: paddle::Queue
:members: :members:
BlockingQueue
class BlockingQueue -------------
-------------------
.. doxygenclass:: paddle::BlockingQueue .. doxygenclass:: paddle::BlockingQueue
:members: :members:
Lock Thread
==== ======
Thread
class RWLock ------
------------ .. doxygenclass:: paddle::Thread
.. doxygenclass:: paddle::RWLock
:members: :members:
class ReadLockGuard ThreadWorker
------------------- ------------
.. doxygenclass:: paddle::ThreadWorker
.. doxygenclass:: paddle::ReadLockGuard
:members: :members:
class SpinLock SyncThreadPool
-------------- --------------
.. doxygenclass:: paddle::SyncThreadPool
.. doxygenclass:: paddle::SpinLock
:members: :members:
class Semaphore MultiThreadWorker
--------------- -----------------
.. doxygenclass:: paddle::MultiThreadWorker
.. doxygenclass:: paddle::Semaphore
:members:
class ThreadBarrier
-------------------
.. doxygenclass:: paddle::ThreadBarrier
:members: :members:
class LockedCondition AsyncThreadPool
--------------------- ---------------
.. doxygenclass:: paddle::AsyncThreadPool
.. doxygenclass:: paddle::LockedCondition
:members: :members:
#!/bin/bash #!/bin/bash
set -e set -e
apt-get update
apt-get install -y dh-make apt-get install -y dh-make
cd ~ cd ~
mkdir -p ~/dist/gpu mkdir -p ~/dist/gpu
mkdir -p ~/dist/cpu mkdir -p ~/dist/cpu
mkdir -p ~/dist/cpu-noavx mkdir -p ~/dist/cpu-noavx
mkdir -p ~/dist/gpu-noavx mkdir -p ~/dist/gpu-noavx
git clone https://github.com/baidu/Paddle.git paddle
cd paddle cd paddle
mkdir build mkdir build
cd build cd build
......
...@@ -3,6 +3,6 @@ set -e ...@@ -3,6 +3,6 @@ set -e
docker build -t build_paddle_deb . docker build -t build_paddle_deb .
rm -rf dist rm -rf dist
mkdir -p dist mkdir -p dist
docker run -v$PWD/dist:/root/dist --name tmp_build_deb_container build_paddle_deb docker run -v$PWD/dist:/root/dist -v $PWD/../../../..:/root/paddle --name tmp_build_deb_container build_paddle_deb
docker rm tmp_build_deb_container docker rm tmp_build_deb_container
docker rmi build_paddle_deb docker rmi build_paddle_deb
FROM ubuntu:14.04 FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=OFF ENV WITH_GPU=OFF
ENV IS_DEVEL=OFF ENV IS_DEVEL=OFF
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM ubuntu:14.04 FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=OFF ENV WITH_GPU=OFF
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=ON ENV WITH_DEMO=ON
......
FROM ubuntu:14.04 FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=OFF ENV WITH_GPU=OFF
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM ubuntu:14.04 FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=OFF ENV WITH_GPU=OFF
ENV IS_DEVEL=OFF ENV IS_DEVEL=OFF
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM ubuntu:14.04 FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=OFF ENV WITH_GPU=OFF
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=ON ENV WITH_DEMO=ON
......
FROM ubuntu:14.04 FROM ubuntu:14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=OFF ENV WITH_GPU=OFF
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=ON ENV WITH_GPU=ON
ENV IS_DEVEL=OFF ENV IS_DEVEL=OFF
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=ON ENV WITH_GPU=ON
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=ON ENV WITH_DEMO=ON
......
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=ON ENV WITH_GPU=ON
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=ON ENV WITH_GPU=ON
ENV IS_DEVEL=OFF ENV IS_DEVEL=OFF
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=ON ENV WITH_GPU=ON
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=ON ENV WITH_DEMO=ON
......
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=ON ENV WITH_GPU=ON
ENV IS_DEVEL=ON ENV IS_DEVEL=ON
ENV WITH_DEMO=OFF ENV WITH_DEMO=OFF
......
FROM PADDLE_BASE_IMAGE FROM PADDLE_BASE_IMAGE
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/ COPY build.sh /root/
ENV GIT_CHECKOUT=develop ENV GIT_CHECKOUT=v0.9.0a0
ENV WITH_GPU=PADDLE_WITH_GPU ENV WITH_GPU=PADDLE_WITH_GPU
ENV IS_DEVEL=PADDLE_IS_DEVEL ENV IS_DEVEL=PADDLE_IS_DEVEL
ENV WITH_DEMO=PADDLE_WITH_DEMO ENV WITH_DEMO=PADDLE_WITH_DEMO
......
...@@ -28,6 +28,34 @@ function version(){ ...@@ -28,6 +28,34 @@ function version(){
echo " with_predict_sdk: @WITH_PREDICT_SDK@" echo " with_predict_sdk: @WITH_PREDICT_SDK@"
} }
function ver2num() {
# convert version to number.
if [ -z "$1" ]; then # empty argument
printf "%03d%03d%03d%03d%03d" 0
else
local VERN=$(echo $1 | sed 's#v##g' | sed 's#\.# #g' \
| sed 's#a# 0 #g' | sed 's#b# 1 #g' | sed 's#rc# 2 #g')
if [ `echo $VERN | wc -w` -eq 3 ] ; then
printf "%03d%03d%03d%03d%03d" $VERN 999 999
else
printf "%03d%03d%03d%03d%03d" $VERN
fi
fi
}
PADDLE_CONF_HOME="$HOME/.config/paddle"
mkdir -p ${PADDLE_CONF_HOME}
if [ -z "${PADDLE_NO_STAT+x}" ]; then
SERVER_VER=`curl -m 5 -X POST --data content="{ \"version\": \"@PADDLE_VERSION@\" }"\
-b ${PADDLE_CONF_HOME}/paddle.cookie \
-c ${PADDLE_CONF_HOME}/paddle.cookie \
http://api.paddlepaddle.org/version 2>/dev/null`
if [ $? -eq 0 ] && [ "$(ver2num @PADDLE_VERSION@)" -lt $(ver2num $SERVER_VER) ]; then
echo "Paddle release a new version ${SERVER_VER}, you can get the install package in http://www.paddlepaddle.org"
fi
fi
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册