Skip to content

Commit 534cf74

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into prior_box
2 parents d662e85 + 88a95a0 commit 534cf74

File tree

6 files changed

+27
-41
lines changed

6 files changed

+27
-41
lines changed

doc/getstarted/build_and_install/docker_install_cn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525

2626
.. code-block:: bash
2727
28-
docker pull docker.paddlepaddle.org/paddle
28+
docker pull docker.paddlepaddlehub.com/paddle
2929
3030
下载GPU版本(cuda8.0_cudnn5_avx_mkl)的Docker镜像:
3131

3232
.. code-block:: bash
3333
3434
docker pull paddlepaddle/paddle:latest-gpu
35-
docker pull docker.paddlepaddle.org/paddle:latest-gpu
35+
docker pull docker.paddlepaddlehub.com/paddle:latest-gpu
3636
3737
选择下载使用不同的BLAS库的Docker镜像:
3838

@@ -49,7 +49,7 @@
4949
5050
docker pull paddlepaddle/paddle:[tag]
5151
# 比如:
52-
docker pull docker.paddlepaddle.org/paddle:0.10.0-gpu
52+
docker pull docker.paddlepaddlehub.com/paddle:0.11.0-gpu
5353
5454
.. _docker_run:
5555

doc/getstarted/build_and_install/docker_install_en.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ For users in China, we provide a faster mirror:
2626

2727
.. code-block:: bash
2828
29-
docker pull docker.paddlepaddle.org/paddle
29+
docker pull docker.paddlepaddlehub.com/paddle
3030
3131
Download GPU version (cuda8.0_cudnn5_avx_mkl) images:
3232

3333
.. code-block:: bash
3434
3535
docker pull paddlepaddle/paddle:latest-gpu
36-
docker pull docker.paddlepaddle.org/paddle:latest-gpu
36+
docker pull docker.paddlepaddlehub.com/paddle:latest-gpu
3737
3838
Choose between different BLAS version:
3939

@@ -53,7 +53,7 @@ and run:
5353
5454
docker pull paddlepaddle/paddle:[tag]
5555
# i.e.
56-
docker pull docker.paddlepaddle.org/paddle:0.10.0-gpu
56+
docker pull docker.paddlepaddlehub.com/paddle:0.11.0-gpu
5757
5858
.. _docker_run:
5959

paddle/framework/variable_test.cc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/*
16-
Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
17-
Licensed under the Apache License, Version 2.0 (the "License");
18-
you may not use this file except in compliance with the License.
19-
You may obtain a copy of the License at
20-
http://www.apache.org/licenses/LICENSE-2.0
21-
Unless required by applicable law or agreed to in writing, software
22-
distributed under the License is distributed on an "AS IS" BASIS,
23-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24-
See the License for the specific language governing permissions and
25-
limitations under the License.
26-
*/
27-
2815
#include <memory>
2916
#include <string>
3017

paddle/operators/bipartite_match_op.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ namespace operators {
2121
using Tensor = framework::Tensor;
2222
using LoDTensor = framework::LoDTensor;
2323

24-
constexpr char kEPS = 1e-6;
25-
2624
class BipartiteMatchOp : public framework::OperatorWithKernel {
2725
public:
2826
using framework::OperatorWithKernel::OperatorWithKernel;
@@ -46,6 +44,7 @@ class BipartiteMatchKernel : public framework::OpKernel<T> {
4644
// The match_dist must be initialized to 0 at first.
4745
void BipartiteMatch(const Tensor& dist, int* match_indices,
4846
T* match_dist) const {
47+
constexpr T kEPS = static_cast<T>(1e-6);
4948
PADDLE_ENFORCE_EQ(dist.dims().size(), 2, "The rank of dist must be 2.");
5049
int64_t row = dist.dims()[0];
5150
int64_t col = dist.dims()[1];

python/paddle/v2/dataset/wmt16.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ def get_dict(lang, dict_size, reverse=False):
305305

306306
dict_path = os.path.join(paddle.v2.dataset.common.DATA_HOME,
307307
"wmt16/%s_%d.dict" % (lang, dict_size))
308-
assert (os.path.exists(dict_path), "Word dictionary does not exist. "
309-
"Please invoke paddle.dataset.wmt16.train/test/validation "
310-
"first to build the dictionary.")
308+
assert os.path.exists(dict_path), "Word dictionary does not exist. "
309+
"Please invoke paddle.dataset.wmt16.train/test/validation first "
310+
"to build the dictionary."
311311
tar_file = os.path.join(paddle.v2.dataset.common.DATA_HOME, "wmt16.tar.gz")
312312
return __load_dict(tar_file, dict_size, lang, reverse)
313313

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
from op_test import OpTest
1717

1818

19-
def bipartite_match(distance, match_indices, match_dis):
19+
def bipartite_match(distance, match_indices, match_dist):
2020
"""Bipartite Matching algorithm.
2121
Arg:
2222
distance (numpy.array) : The distance of two entries with shape [M, N].
2323
match_indices (numpy.array): the matched indices from column to row
2424
with shape [1, N], it must be initialized to -1.
25-
match_dis (numpy.array): The matched distance from column to row
25+
match_dist (numpy.array): The matched distance from column to row
2626
with shape [1, N], it must be initialized to 0.
2727
"""
2828
match_pair = []
@@ -36,13 +36,13 @@ def bipartite_match(distance, match_indices, match_dis):
3636
row_indices = -1 * np.ones((row, ), dtype=np.int)
3737

3838
idx = 0
39-
for i, j, dis in match_sorted:
39+
for i, j, dist in match_sorted:
4040
if idx >= row:
4141
break
42-
if match_indices[j] == -1 and row_indices[i] == -1 and dis > 0:
42+
if match_indices[j] == -1 and row_indices[i] == -1 and dist > 0:
4343
match_indices[j] = i
4444
row_indices[i] = j
45-
match_dis[j] = dis
45+
match_dist[j] = dist
4646
idx += 1
4747

4848

@@ -55,24 +55,24 @@ def batch_bipartite_match(distance, lod):
5555
n = len(lod) - 1
5656
m = distance.shape[1]
5757
match_indices = -1 * np.ones((n, m), dtype=np.int)
58-
match_dis = np.zeros((n, m), dtype=np.float32)
58+
match_dist = np.zeros((n, m), dtype=np.float32)
5959
for i in range(len(lod) - 1):
6060
bipartite_match(distance[lod[i]:lod[i + 1], :], match_indices[i, :],
61-
match_dis[i, :])
62-
return match_indices, match_dis
61+
match_dist[i, :])
62+
return match_indices, match_dist
6363

6464

6565
class TestBipartiteMatchOpForWithLoD(OpTest):
6666
def setUp(self):
6767
self.op_type = 'bipartite_match'
6868
lod = [[0, 5, 11, 23]]
69-
dis = np.random.random((23, 217)).astype('float32')
70-
match_indices, match_dis = batch_bipartite_match(dis, lod[0])
69+
dist = np.random.random((23, 217)).astype('float32')
70+
match_indices, match_dist = batch_bipartite_match(dist, lod[0])
7171

72-
self.inputs = {'DistMat': (dis, lod)}
72+
self.inputs = {'DistMat': (dist, lod)}
7373
self.outputs = {
7474
'ColToRowMatchIndices': (match_indices),
75-
'ColToRowMatchDis': (match_dis),
75+
'ColToRowMatchDis': (match_dist),
7676
}
7777

7878
def test_check_output(self):
@@ -83,13 +83,13 @@ class TestBipartiteMatchOpWithoutLoD(OpTest):
8383
def setUp(self):
8484
self.op_type = 'bipartite_match'
8585
lod = [[0, 8]]
86-
dis = np.random.random((8, 17)).astype('float32')
87-
match_indices, match_dis = batch_bipartite_match(dis, lod[0])
86+
dist = np.random.random((8, 17)).astype('float32')
87+
match_indices, match_dist = batch_bipartite_match(dist, lod[0])
8888

89-
self.inputs = {'DistMat': dis}
89+
self.inputs = {'DistMat': dist}
9090
self.outputs = {
91-
'ColToRowMatchIndices': (match_indices),
92-
'ColToRowMatchDis': (match_dis),
91+
'ColToRowMatchIndices': match_indices,
92+
'ColToRowMatchDis': match_dist,
9393
}
9494

9595
def test_check_output(self):

0 commit comments

Comments
 (0)