Skip to content

Commit ea3be88

Browse files
committed
Merge branch 'develop' into fluid_python
2 parents ef5d3d4 + 00a2151 commit ea3be88

File tree

5 files changed

+30
-20
lines changed

5 files changed

+30
-20
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ COPY ./paddle/scripts/docker/root/ /root/
2222

2323
RUN apt-get update && \
2424
apt-get install -y \
25-
git python-pip python-dev openssh-server bison libnccl-dev \
25+
git python-pip python-dev openssh-server bison \
26+
libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 \
2627
wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \
2728
curl sed grep graphviz libjpeg-dev zlib1g-dev \
2829
python-matplotlib gcc-4.8 g++-4.8 \

doc/api/overview.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
API Overview
2-
============
1+
V2 API Overview
2+
================
33

4-
TBD
4+
The PaddlePaddle V2 API is designed to provide a modern user interface for PaddlePaddle V1(the original layer-based platform of PaddlePaddle),
5+
it proposes some high-level concepts such as `Layers <http://www.paddlepaddle.org/docs/develop/api/en/v2/config/layer.html>`_ , `Optimizer <http://www.paddlepaddle.org/docs/develop/api/en/v2/config/optimizer.html>`_ , `Evaluator <http://www.paddlepaddle.org/docs/develop/api/en/v2/config/evaluators.html>`_ and `Data Reader <http://www.paddlepaddle.org/docs/develop/api/en/v2/data/data_reader.html>`_ to make the model configuration more familiar to users.
6+
7+
A model is composed of the computation described by a group of `Layers`, with `Evaluator` to define the error, `Optimizer` to update the parameters and `Data Reader` to feed in the data.
8+
9+
We also provide the `interface for Training and Inference <http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html>`_ to help control the training and inference phrase,
10+
it has several easy to use methods
11+
12+
- `paddle.train`
13+
- `paddle.test`
14+
- `paddle.infer`
15+
16+
to better expose the internal running details, different `events <http://www.paddlepaddle.org/docs/develop/api/en/v2/run_logic.html#event>`_ are available to users by writing some callbacks.

paddle/fluid/platform/nccl_test.cu

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ TEST(NCCL, all_reduce) {
129129
} // namespace paddle
130130

131131
int main(int argc, char** argv) {
132-
// FIXME(tonyyang-svail):
133-
// Due to the driver issue on our CI, disable for now
134-
return 0;
135132
dev_count = paddle::platform::GetCUDADeviceCount();
136133
if (dev_count <= 1) {
137134
LOG(WARNING)

paddle/scripts/docker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ EOF
171171
EOF
172172

173173
if [[ ${WITH_GPU} == "ON" ]]; then
174-
NCCL_DEPS="apt-get install -y libnccl-dev &&"
174+
NCCL_DEPS="apt-get install -y libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 &&"
175175
else
176176
NCCL_DEPS=""
177177
fi

python/paddle/fluid/layers/nn.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,21 +1519,21 @@ def batch_norm(input,
15191519
bias = helper.create_parameter(
15201520
attr=helper.bias_attr, shape=param_shape, dtype=dtype, is_bias=True)
15211521

1522-
mean = helper.create_global_variable(
1523-
name=moving_mean_name,
1524-
dtype=input.dtype,
1522+
mean = helper.create_parameter(
1523+
attr=ParamAttr(
1524+
name=moving_mean_name, initializer=Constant(0.0), trainable=False),
15251525
shape=param_shape,
1526-
persistable=True,
1527-
stop_gradient=True)
1528-
helper.set_variable_initializer(var=mean, initializer=Constant(0.0))
1526+
dtype=input.dtype)
1527+
mean.stop_gradient = True
15291528

1530-
variance = helper.create_global_variable(
1531-
name=moving_variance_name,
1532-
dtype=input.dtype,
1529+
variance = helper.create_parameter(
1530+
attr=ParamAttr(
1531+
name=moving_variance_name,
1532+
initializer=Constant(1.0),
1533+
trainable=False),
15331534
shape=param_shape,
1534-
persistable=True,
1535-
stop_gradient=True)
1536-
helper.set_variable_initializer(var=variance, initializer=Constant(1.0))
1535+
dtype=input.dtype)
1536+
variance.stop_gradient = True
15371537

15381538
# create output
15391539
# mean and mean_out share the same memory

0 commit comments

Comments
 (0)