Skip to content

Commit 40f4ad7

Browse files
【Old trt】add yolo_box dynamic converter (PaddlePaddle#71231)
* fix trt model bugs * fix bugs * fix inplace bugs * fix --------- Co-authored-by: YuanRisheng <yuanrisheng@baidu.com>
1 parent 283fd37 commit 40f4ad7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

paddle/fluid/inference/tensorrt/convert/yolo_box_op.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ class YoloBoxOpConverter : public OpConverter {
5050
: 0.5;
5151

5252
int type_id = static_cast<int>(engine_->WithFp16());
53-
auto input_dim = X_tensor->getDimensions();
54-
auto* yolo_box_plugin = new plugin::YoloBoxPlugin(
53+
auto* yolo_box_plugin = new plugin::YoloBoxPluginDynamic(
5554
type_id ? nvinfer1::DataType::kHALF : nvinfer1::DataType::kFLOAT,
5655
anchors,
5756
class_num,
@@ -60,9 +59,7 @@ class YoloBoxOpConverter : public OpConverter {
6059
clip_bbox,
6160
scale_x_y,
6261
iou_aware,
63-
iou_aware_factor,
64-
input_dim.d[1],
65-
input_dim.d[2]);
62+
iou_aware_factor);
6663

6764
std::vector<nvinfer1::ITensor*> yolo_box_inputs;
6865
yolo_box_inputs.push_back(X_tensor);

0 commit comments

Comments
 (0)