-
Notifications
You must be signed in to change notification settings - Fork 20
/
regionLayer.h~
44 lines (38 loc) · 1.43 KB
/
regionLayer.h~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef REGION_LAYER_H_
#define REGION_LAYER_H_
#include "nvUtils.h"
class regionParams{
public:
int classes; // number of class
int n; // number of bbox per location
int coords; // number of coords (4)
int w; // w (darknet)
int h; // h (darknet), in total, we have w*h*n bbox
int outputs; // outputs (darknet), output dimension of previous layer,
bool softmax; // 1 for softmax process
int background; // background index
};
typedef struct{
float x, y, w, h;
} box;
void regionLayer_gpu(const int batch,
const int C,
const int nCells,
const int num,
const int coords,
const int classes,
const float * input,
float * output,
cudaStream_t stream);
void reorgOutput_gpu(const int nBatch,
const int nClasses,
const int nBboxesPerLoc,
const int coords,
const int l0_w,
const int l0_h,
const int nCells,
float* __constant__ dpData_unordered[],
float* dpData,
const long nData,
cudaStream_t stream);
#endif