Fix Darknet models / Small fixes
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
__global__ void gpuYoloLayer_nc(const float* input, float* boxes, float* scores, int* classes, const uint netWidth,
|
||||
__global__ void gpuYoloLayer_nc(const float* input, float* boxes, float* scores, float* classes, const uint netWidth,
|
||||
const uint netHeight, const uint gridSizeX, const uint gridSizeY, const uint numOutputClasses, const uint numBBoxes,
|
||||
const uint64_t lastInputSize, const float scaleXY, const float* anchors, const int* mask)
|
||||
{
|
||||
@@ -52,7 +52,7 @@ __global__ void gpuYoloLayer_nc(const float* input, float* boxes, float* scores,
|
||||
boxes[count * 4 + 2] = w;
|
||||
boxes[count * 4 + 3] = h;
|
||||
scores[count] = maxProb * objectness;
|
||||
classes[count] = maxIndex;
|
||||
classes[count] = (float) maxIndex;
|
||||
}
|
||||
|
||||
cudaError_t cudaYoloLayer_nc(const void* input, void* boxes, void* scores, void* classes, const uint& batchSize,
|
||||
@@ -74,7 +74,7 @@ cudaError_t cudaYoloLayer_nc(const void* input, void* boxes, void* scores, void*
|
||||
reinterpret_cast<const float*> (input) + (batch * inputSize),
|
||||
reinterpret_cast<float*> (boxes) + (batch * 4 * outputSize),
|
||||
reinterpret_cast<float*> (scores) + (batch * 1 * outputSize),
|
||||
reinterpret_cast<int*> (classes) + (batch * 1 * outputSize),
|
||||
reinterpret_cast<float*> (classes) + (batch * 1 * outputSize),
|
||||
netWidth, netHeight, gridSizeX, gridSizeY, numOutputClasses, numBBoxes, lastInputSize, scaleXY,
|
||||
reinterpret_cast<const float*> (anchors), reinterpret_cast<const int*> (mask));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user