Skip to content

Commit e44dedf

Browse files
committed
Fix the warning and unit test.
1 parent 74af23b commit e44dedf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

paddle/operators/bipartite_match_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BipartiteMatchKernel : public framework::OpKernel<T> {
6262
if (match_indices[j] != -1) {
6363
continue;
6464
}
65-
for (int k = 0; k < row_pool.size(); ++k) {
65+
for (size_t k = 0; k < row_pool.size(); ++k) {
6666
int m = row_pool[k];
6767
// distance is 0 between m-th row and j-th column
6868
if (dist_data[m * col + j] < kEPS) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def setUp(self):
6969
dis = np.random.random((23, 217)).astype('float32')
7070
match_indices, match_dis = batch_bipartite_match(dis, lod[0])
7171

72-
self.inputs = {'DisMat': (dis, lod)}
72+
self.inputs = {'DistMat': (dis, lod)}
7373
self.outputs = {
7474
'ColToRowMatchIndices': (match_indices),
7575
'ColToRowMatchDis': (match_dis),
@@ -86,7 +86,7 @@ def setUp(self):
8686
dis = np.random.random((8, 17)).astype('float32')
8787
match_indices, match_dis = batch_bipartite_match(dis, lod[0])
8888

89-
self.inputs = {'DisMat': dis}
89+
self.inputs = {'DistMat': dis}
9090
self.outputs = {
9191
'ColToRowMatchIndices': (match_indices),
9292
'ColToRowMatchDis': (match_dis),

0 commit comments

Comments
 (0)