Skip to content

Commit 38c6105

Browse files
Merge pull request #7543 from sidgoyal78/bn_designdoc
Modify directory structure to show plots in batch_norm documentation.
2 parents 29e71d2 + 4031e88 commit 38c6105

File tree

5 files changed

+42
-3
lines changed

5 files changed

+42
-3
lines changed

.copyright.hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def main(argv=None):
9090
retv = 0
9191
for filename in args.filenames:
9292
first_line = io.open(filename).readline()
93-
if "Copyright" in first_line: continue
93+
if "COPYRIGHT" in first_line.upper() : continue
9494
original_contents = io.open(filename).read()
9595
new_contents = generate_copyright(
9696
COPYRIGHT, lang_type(filename)) + original_contents

benchmark/tensorflow/image/googlenet_multi_gpu.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
2+
#
3+
#Licensed under the Apache License, Version 2.0 (the "License");
4+
#you may not use this file except in compliance with the License.
5+
#You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
#Unless required by applicable law or agreed to in writing, software
10+
#distributed under the License is distributed on an "AS IS" BASIS,
11+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
#See the License for the specific language governing permissions and
13+
#limitations under the License.
114
from six.moves import xrange # pylint: disable=redefined-builtin
215
from datetime import datetime
316
import math

doc/getstarted/concepts/src/infer.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
2+
#
3+
#Licensed under the Apache License, Version 2.0 (the "License");
4+
#you may not use this file except in compliance with the License.
5+
#You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
#Unless required by applicable law or agreed to in writing, software
10+
#distributed under the License is distributed on an "AS IS" BASIS,
11+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
#See the License for the specific language governing permissions and
13+
#limitations under the License.
114
import paddle.v2 as paddle
215
import numpy as np
316

paddle/operators/op_documentation/batch_norm_op.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ As most C++ operators do, `batch_norm_op` is defined by inputs, outputs, attribu
6666

6767
The following graph showes the training computational process of `batch_norm_op`:
6868

69-
<img src="./images/batch_norm_op_kernel.png" width="800"/>
69+
<img src="../images/batch_norm_op_kernel.png" width="800"/>
7070

7171
cudnn provides APIs to finish the whole series of computation, we can use them in our GPU kernel.
7272

@@ -124,7 +124,7 @@ for pass_id in range(PASS_NUM):
124124
`is_infer` is an attribute. Once an operator is created, its attributes can not be changed. It suggests us that we shall maintain two `batch_norm_op` in the model, one's `is_infer` is `True`(we call it `infer_batch_norm_op`) and the other one's is `False`(we call it `train_batch_norm_op`). They share all parameters and variables, but be placed in two different branches. That is to say, if a network contains a `batch_norm_op`, it will fork into two branches, one go through `train_batch_norm_op` and the other one go through `infer_batch_norm_op`:
125125

126126
<div align=center>
127-
<img src="./images/batch_norm_fork.png" width="500"/>
127+
<img src="../images/batch_norm_fork.png" width="500"/>
128128
</div>
129129

130130
Just like what is shown in the above graph, the net forks before `batch_norm_op` and will never merge again. All the operators after `batch_norm_op` will duplicate.

python/paddle/v2/fluid/tests/test_dynrnn_static_input.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
2+
#
3+
#Licensed under the Apache License, Version 2.0 (the "License");
4+
#you may not use this file except in compliance with the License.
5+
#You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
#Unless required by applicable law or agreed to in writing, software
10+
#distributed under the License is distributed on an "AS IS" BASIS,
11+
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
#See the License for the specific language governing permissions and
13+
#limitations under the License.
114
import unittest
215
import paddle.v2 as paddle
316
import paddle.v2.fluid.core as core

0 commit comments

Comments
 (0)