Skip to content

Commit c12176e

Browse files
authored
fix yolo (#36240)
1 parent 56b04bc commit c12176e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ __device__ inline void GetYoloBox(float* box, const T* x, const int* anchors,
119119
int img_height, int img_width, float scale,
120120
float bias) {
121121
box[0] = static_cast<float>(
122-
(i + sigmoid(static_cast<float>(x[index]) * scale + bias)) * img_width /
122+
(i + sigmoid(static_cast<float>(x[index])) * scale + bias) * img_width /
123123
grid_size_w);
124124
box[1] = static_cast<float>(
125-
(j + sigmoid(static_cast<float>(x[index + stride]) * scale + bias)) *
125+
(j + sigmoid(static_cast<float>(x[index + stride])) * scale + bias) *
126126
img_height / grid_size_h);
127127
box[2] = static_cast<float>(expf(static_cast<float>(x[index + 2 * stride])) *
128128
anchors[2 * an_idx] * img_width / input_size_w);

0 commit comments

Comments
 (0)