We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d274d90 commit 668d89bCopy full SHA for 668d89b
1 file changed
yolov5/yolov5.cpp
@@ -1,5 +1,6 @@
1
#include <iostream>
2
#include <chrono>
3
+#include <cmath>
4
#include "cuda_utils.h"
5
#include "logging.h"
6
#include "common.hpp"
@@ -23,10 +24,8 @@ static Logger gLogger;
23
24
25
static int get_width(int x, float gw, int divisor = 8) {
26
//return math.ceil(x / divisor) * divisor
- if (int(x * gw) % divisor == 0) {
27
- return int(x * gw);
28
- }
29
- return (int(x * gw / divisor) + 1) * divisor;
+
+ return int(ceil((x * gw) / divisor)) * divisor;
30
}
31
32
static int get_depth(int x, float gd) {
0 commit comments