Add csresnext50-panet-spp test. Works on CUDNN. Does not work with TensorRT

Signed-off-by: Francesco Gatti <gattifrancesco@hotmail.it>
This commit is contained in:
Francesco Gatti
2020-03-11 18:37:26 +01:00
parent e6aa73d7bc
commit f6527f51e3
9 changed files with 666 additions and 38 deletions
+3 -2
View File
@@ -321,12 +321,13 @@ public:
int winH, winW;
int strideH, strideW;
int paddingH, paddingW;
bool test;
tkdnnPoolingMode_t pool_mode;
Pooling(Network *net, int winH, int winW,
int strideH, int strideW,
int paddingH = 0, int paddingW = 0,
tkdnnPoolingMode_t pool_mode = POOLING_MAX, bool final = false);
tkdnnPoolingMode_t pool_mode = POOLING_MAX, bool final = false, bool test=false);
virtual ~Pooling();
virtual layerType_t getLayerType() { return LAYER_POOLING; };
@@ -473,7 +474,7 @@ public:
dnnType *predictions;
static const int MAX_DETECTIONS = 1024;
static const int MAX_DETECTIONS = 4096;
static Yolo::detection *allocateDetections(int nboxes, int classes);
static void mergeDetections(Yolo::detection *dets, int ndets, int classes);
};
+1 -1
View File
@@ -37,7 +37,7 @@ class Yolo3Detection {
int classes = 0;
int num = 0;
int n_masks = 0;
float thresh = 0.05;
float thresh = 0.3;
cv::Scalar colors[256];
// this is filled with results
+25 -25
View File
@@ -3,33 +3,34 @@
#include "utils.h"
void activationELUForward(dnnType* srcData, dnnType* dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationLEAKYForward(dnnType* srcData, dnnType* dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationReLUCeilingForward(dnnType* srcData, dnnType* dstData, int size, const float ceiling, cudaStream_t stream= cudaStream_t(0));
void activationLOGISTICForward(dnnType* srcData, dnnType* dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationSIGMOIDForward(dnnType* srcData, dnnType* dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationELUForward(dnnType *srcData, dnnType *dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationLEAKYForward(dnnType *srcData, dnnType *dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationReLUCeilingForward(dnnType *srcData, dnnType *dstData, int size, const float ceiling, cudaStream_t stream = cudaStream_t(0));
void activationLOGISTICForward(dnnType *srcData, dnnType *dstData, int size, cudaStream_t stream = cudaStream_t(0));
void activationSIGMOIDForward(dnnType *srcData, dnnType *dstData, int size, cudaStream_t stream = cudaStream_t(0));
void fill(dnnType* data, int size, dnnType val, cudaStream_t stream = cudaStream_t(0));
void fill(dnnType *data, int size, dnnType val, cudaStream_t stream = cudaStream_t(0));
void resizeForward( dnnType* srcData, dnnType* dstData, int n, int i_c, int i_h, int i_w,
int o_c, int o_h, int o_w, cudaStream_t stream = cudaStream_t(0));
void resizeForward(dnnType *srcData, dnnType *dstData, int n, int i_c, int i_h, int i_w,
int o_c, int o_h, int o_w, cudaStream_t stream = cudaStream_t(0));
void reorgForward( dnnType* srcData, dnnType* dstData,
int n, int c, int h, int w, int stride, cudaStream_t stream = cudaStream_t(0));
void softmaxForward(float *input, int n, int batch, int batch_offset,
void reorgForward(dnnType *srcData, dnnType *dstData,
int n, int c, int h, int w, int stride, cudaStream_t stream = cudaStream_t(0));
void MaxPoolingForward(dnnType *srcData, dnnType *dstData, int n, int c, int h, int w, int stride_x, int stride_y, int size, int padding, cudaStream_t stream = cudaStream_t(0));
void softmaxForward(float *input, int n, int batch, int batch_offset,
int groups, int group_offset, int stride, float temp, float *output, cudaStream_t stream = cudaStream_t(0));
void shortcutForward(dnnType* srcData, dnnType* dstData, int n1, int c1, int h1, int w1, int s1,
int n2, int c2, int h2, int w2, int s2,
void shortcutForward(dnnType *srcData, dnnType *dstData, int n1, int c1, int h1, int w1, int s1,
int n2, int c2, int h2, int w2, int s2,
cudaStream_t stream = cudaStream_t(0));
void upsampleForward(dnnType* srcData, dnnType* dstData,
int n, int c, int h, int w, int s, int forward, float scale,
void upsampleForward(dnnType *srcData, dnnType *dstData,
int n, int c, int h, int w, int s, int forward, float scale,
cudaStream_t stream = cudaStream_t(0));
void float2half(float* srcData, __half* dstData, int size, const cudaStream_t stream = cudaStream_t(0));
void float2half(float *srcData, __half *dstData, int size, const cudaStream_t stream = cudaStream_t(0));
// void modulated_deformable_im2col_cuda(cudaStream_t stream,
// const float *data_im, const float *data_offset, const float *data_mask,
@@ -39,13 +40,12 @@ void float2half(float* srcData, __half* dstData, int size, const cudaStream_t st
// const int dilation_h, const int dilation_w,
// const int deformable_group, float *data_col);
void modulated_deformable_im2col_cuda(cudaStream_t stream,
const float *data_im, const float *data_offset, const float *data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col,
const int deformable_group, float *data_col);
const float *data_im, const float *data_offset, const float *data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col,
const int deformable_group, float *data_col);
void dcn_v2_cuda_forward(cublasStatus_t stat, cublasHandle_t handle,
void dcn_v2_cuda_forward(cublasStatus_t stat, cublasHandle_t handle,
float *input, float *weight,
float *bias, float *ones,
float *offset, float *mask,
@@ -54,7 +54,7 @@ void dcn_v2_cuda_forward(cublasStatus_t stat, cublasHandle_t handle,
const int stride_h, const int stride_w,
const int pad_h, const int pad_w,
const int dilation_h, const int dilation_w,
const int deformable_group,
const int deformable_group,
const int in_n, const int in_c, const int in_h, const int in_w,
const int out_n, const int out_c, const int out_h, const int out_w,
const int dst_dim, cudaStream_t stream = cudaStream_t(0));