Skip to content

Commit

Permalink
fix yolo (#36240)
Browse files Browse the repository at this point in the history
  • Loading branch information
b3602sss authored Sep 30, 2021
1 parent 56b04bc commit c12176e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ __device__ inline void GetYoloBox(float* box, const T* x, const int* anchors,
int img_height, int img_width, float scale,
float bias) {
box[0] = static_cast<float>(
(i + sigmoid(static_cast<float>(x[index]) * scale + bias)) * img_width /
(i + sigmoid(static_cast<float>(x[index])) * scale + bias) * img_width /
grid_size_w);
box[1] = static_cast<float>(
(j + sigmoid(static_cast<float>(x[index + stride]) * scale + bias)) *
(j + sigmoid(static_cast<float>(x[index + stride])) * scale + bias) *
img_height / grid_size_h);
box[2] = static_cast<float>(expf(static_cast<float>(x[index + 2 * stride])) *
anchors[2 * an_idx] * img_width / input_size_w);
Expand Down

0 comments on commit c12176e

Please sign in to comment.