diff --git a/paddle/fluid/operators/detection/generate_proposals_op.cu b/paddle/fluid/operators/detection/generate_proposals_op.cu index efeeecf7211f7b16e6581006e7432474f75814cd..91213b3c4d9db54469ec151ff1dd8e56c3118fea 100644 --- a/paddle/fluid/operators/detection/generate_proposals_op.cu +++ b/paddle/fluid/operators/detection/generate_proposals_op.cu @@ -418,7 +418,7 @@ class CUDAGenerateProposalsKernel : public framework::OpKernel { T *rpn_rois_data = rpn_rois->data(); T *rpn_roi_probs_data = rpn_roi_probs->data(); - auto &place = boost::get(dev_ctx.GetPlace()); + auto place = boost::get(dev_ctx.GetPlace()); int64_t num_proposals = 0; std::vector offset(1, 0);