CenterNet TensorRT works. TensorRT serialization not yet implemented

Signed-oof-by: Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
Davide Sapienza
2019-12-20 11:05:03 +01:00
parent e99b353d8b
commit d889ed385d
9 changed files with 167 additions and 35 deletions
+7 -6
View File
@@ -32,7 +32,7 @@ enum layerType_t {
class Layer {
public:
Layer(Network *net);
Layer(Network *net, bool final = false);
virtual ~Layer();
virtual layerType_t getLayerType() = 0;
@@ -43,6 +43,7 @@ public:
dataDim_t input_dim, output_dim;
dnnType *dstData; //where results will be putted
bool final; //if the layer is the final one
std::string getLayerName() {
layerType_t type = getLayerType();
@@ -80,7 +81,7 @@ class LayerWgs : public Layer {
public:
LayerWgs(Network *net, int inputs, int outputs, int kh, int kw, int kt,
std::string fname_weights, bool batchnorm = false, bool additional_bias = false);
std::string fname_weights, bool batchnorm = false, bool additional_bias = false, bool final = false);
virtual ~LayerWgs();
int inputs, outputs;
@@ -160,7 +161,7 @@ class Conv2d : public LayerWgs {
public:
Conv2d( Network *net, int out_ch, int kernelH, int kernelW,
int strideH, int strideW, int paddingH, int paddingW,
std::string fname_weights, bool batchnorm = false, bool deConv = false);
std::string fname_weights, bool batchnorm = false, bool deConv = false, bool final = false);
virtual ~Conv2d();
virtual layerType_t getLayerType() { return LAYER_CONV2D; };
@@ -217,15 +218,15 @@ public:
int out_ch;
int deformableGroup;
int kernelH, kernelW, strideH, strideW, paddingH, paddingW;
protected:
dnnType *ones_d1;
dnnType *ones_d2;
cudnnTensorDescriptor_t biasTensorDesc;
int chunk_dim;
dnnType *offset, *mask;
dnnType *output_conv;
protected:
cudnnTensorDescriptor_t biasTensorDesc;
void initCUDNN();
};