Fix the warning and unit test.

fix-profile-doc-typo
dangqingqing 8 years ago
parent 74af23b6d1
commit e44dedf90f

@ -62,7 +62,7 @@ class BipartiteMatchKernel : public framework::OpKernel<T> {
if (match_indices[j] != -1) {
continue;
}
for (int k = 0; k < row_pool.size(); ++k) {
for (size_t k = 0; k < row_pool.size(); ++k) {
int m = row_pool[k];
// distance is 0 between m-th row and j-th column
if (dist_data[m * col + j] < kEPS) {

@ -69,7 +69,7 @@ class TestBipartiteMatchOpForWithLoD(OpTest):
dis = np.random.random((23, 217)).astype('float32')
match_indices, match_dis = batch_bipartite_match(dis, lod[0])
self.inputs = {'DisMat': (dis, lod)}
self.inputs = {'DistMat': (dis, lod)}
self.outputs = {
'ColToRowMatchIndices': (match_indices),
'ColToRowMatchDis': (match_dis),
@ -86,7 +86,7 @@ class TestBipartiteMatchOpWithoutLoD(OpTest):
dis = np.random.random((8, 17)).astype('float32')
match_indices, match_dis = batch_bipartite_match(dis, lod[0])
self.inputs = {'DisMat': dis}
self.inputs = {'DistMat': dis}
self.outputs = {
'ColToRowMatchIndices': (match_indices),
'ColToRowMatchDis': (match_dis),

Loading…
Cancel
Save