File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
paddle/fluid/operators/detection
python/paddle/fluid/layers Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,9 @@ class MineHardExamplesOp : public framework::OperatorWithKernel {
227
227
PADDLE_ENFORCE_GT (
228
228
neg_pos_ratio, 0 .0f ,
229
229
" neg_pos_ratio must greater than zero in max_negative mode" );
230
+ PADDLE_ENFORCE_LT (
231
+ neg_dist_threshold, 1 .0f ,
232
+ " neg_dist_threshold must less than one in max_negative mode" );
230
233
PADDLE_ENFORCE_GT (
231
234
neg_dist_threshold, 0 .0f ,
232
235
" neg_dist_threshold must greater than zero in max_negative mode" );
Original file line number Diff line number Diff line change @@ -722,7 +722,7 @@ def __reshape_to_2d(var):
722
722
},
723
723
attrs = {
724
724
'neg_pos_ratio' : neg_pos_ratio ,
725
- 'neg_dist_threshold' : neg_pos_ratio ,
725
+ 'neg_dist_threshold' : neg_overlap ,
726
726
'mining_type' : mining_type ,
727
727
'sample_size' : sample_size ,
728
728
})
You can’t perform that action at this time.
0 commit comments