Skip to content

Commit

Permalink
fix parameters name inconsistent for Proposal OP and Multi Proposal OP (
Browse files Browse the repository at this point in the history
  • Loading branch information
wkcn authored and piiswrong committed May 29, 2018
1 parent 805a71a commit 33de266
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/operator/contrib/multi_proposal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ DMLC_REGISTER_PARAMETER(MultiProposalParam);

MXNET_REGISTER_OP_PROPERTY(_contrib_MultiProposal, MultiProposalProp)
.describe("Generate region proposals via RPN")
.add_argument("cls_score", "NDArray-or-Symbol", "Score of how likely proposal is object.")
.add_argument("cls_prob", "NDArray-or-Symbol", "Score of how likely proposal is object.")
.add_argument("bbox_pred", "NDArray-or-Symbol", "BBox Predicted deltas from anchors for proposals")
.add_argument("im_info", "NDArray-or-Symbol", "Image size and scale.")
.add_arguments(MultiProposalParam::__FIELDS__());
Expand Down
2 changes: 1 addition & 1 deletion src/operator/contrib/proposal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ DMLC_REGISTER_PARAMETER(ProposalParam);

MXNET_REGISTER_OP_PROPERTY(_contrib_Proposal, ProposalProp)
.describe("Generate region proposals via RPN")
.add_argument("cls_score", "NDArray-or-Symbol", "Score of how likely proposal is object.")
.add_argument("cls_prob", "NDArray-or-Symbol", "Score of how likely proposal is object.")
.add_argument("bbox_pred", "NDArray-or-Symbol", "BBox Predicted deltas from anchors for proposals")
.add_argument("im_info", "NDArray-or-Symbol", "Image size and scale.")
.add_arguments(ProposalParam::__FIELDS__());
Expand Down
4 changes: 2 additions & 2 deletions tests/python/gpu/test_operator_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ def check_proposal_consistency(op, batch_size):
'''
cls_prob, bbox_pred, im_info = get_new_data(batch_size, mx.cpu(0))
rois_cpu, score_cpu = op(
cls_score = cls_prob,
cls_prob = cls_prob,
bbox_pred = bbox_pred,
im_info = im_info,
feature_stride = feature_stride,
Expand All @@ -1767,7 +1767,7 @@ def check_proposal_consistency(op, batch_size):
im_info_gpu = im_info.as_in_context(gpu_ctx)

rois_gpu, score_gpu = op(
cls_score = cls_prob_gpu,
cls_prob = cls_prob_gpu,
bbox_pred = bbox_pred_gpu,
im_info = im_info_gpu,
feature_stride = feature_stride,
Expand Down
6 changes: 3 additions & 3 deletions tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5818,7 +5818,7 @@ def test_multi_proposal_op():
rpn_min_size = 16

batch_size = 20
feat_len = 14
feat_len = (1000 + 15) // 16
H, W = feat_len, feat_len
num_anchors = len(scales) * len(ratios)
count_anchors = H * W * num_anchors
Expand Down Expand Up @@ -5852,7 +5852,7 @@ def check_forward(rpn_pre_nms_top_n, rpn_post_nms_top_n):
single_score = []
for i in range(batch_size):
rois, score = mx.nd.contrib.Proposal(
cls_score = get_sub(cls_prob, i),
cls_prob = get_sub(cls_prob, i),
bbox_pred = get_sub(bbox_pred, i),
im_info = get_sub(im_info, i),
feature_stride = feature_stride,
Expand All @@ -5866,7 +5866,7 @@ def check_forward(rpn_pre_nms_top_n, rpn_post_nms_top_n):
single_score.append(score)

multi_proposal, multi_score = mx.nd.contrib.MultiProposal(
cls_score = cls_prob,
cls_prob = cls_prob,
bbox_pred = bbox_pred,
im_info = im_info,
feature_stride = feature_stride,
Expand Down

0 comments on commit 33de266

Please sign in to comment.