From 5fe4d7fb6b03164b11ba6074da848c241177adf9 Mon Sep 17 00:00:00 2001 From: sweetsky0901 Date: Mon, 11 Dec 2017 23:21:26 +0800 Subject: [PATCH] modify a bug *input_nums --- paddle/operators/detection_output_op.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/paddle/operators/detection_output_op.h b/paddle/operators/detection_output_op.h index 74a609d0a42..510d82251d8 100644 --- a/paddle/operators/detection_output_op.h +++ b/paddle/operators/detection_output_op.h @@ -71,10 +71,11 @@ class Detection_output_Kernel : public framework::OpKernel { framework::make_ddim(conf_shape_softmax_vec)); // for knchw => nhwc std::vector loc_shape_vec({1, in_loc->dims()[1], in_loc->dims()[3], - in_loc->dims()[4], in_loc->dims()[2]}); - std::vector conf_shape_vec({1, in_conf->dims()[1], - in_conf->dims()[3], in_conf->dims()[4], - in_conf->dims()[2]}); + in_loc->dims()[4], + in_loc->dims()[2] * in_loc->dims()[0]}); + std::vector conf_shape_vec( + {1, in_conf->dims()[1], in_conf->dims()[3], in_conf->dims()[4], + in_conf->dims()[2] * in_conf->dims()[0]}); framework::DDim loc_shape(framework::make_ddim(loc_shape_vec)); framework::DDim conf_shape(framework::make_ddim(conf_shape_vec)); framework::Tensor loc_tensor; -- GitLab