Fix dependencies problems

Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
Micaela Verucchi
2020-02-27 16:48:10 +01:00
parent 3eb079dd13
commit fe206ea24c
7 changed files with 21 additions and 78 deletions
+5
View File
@@ -1,3 +1,6 @@
#ifndef SORTING_H
#define SORTING_H
#include <thrust/sort.h>
#include <thrust/execution_policy.h>
#include <thrust/functional.h>
@@ -32,3 +35,5 @@ void topKxyAddOffset(int * ids_begin, const int K, const int size, int *intxs_be
float *xs_begin, float *ys_begin, dnnType *src_begin, float *src_out, int *ids_out);
void bboxes(int * ids_begin, const int K, const int size, float *xs_begin, float *ys_begin,
dnnType *src_begin, float *bbx0, float *bbx1, float *bby0, float *bby1, float *src_out, int *ids_out);
#endif /*SORTING_H*/
+2 -1
View File
@@ -2,13 +2,14 @@
#define MOBILENETDETECTION_H
#include <iostream>
#include "tkdnn.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "tkdnn.h"
#define N_COORDS 4
+5
View File
@@ -1,3 +1,6 @@
#ifndef YOLODETECTION_H
#define YOLODETECTION_H
#include <iostream>
#include <signal.h>
#include <stdlib.h> /* srand, rand */
@@ -66,3 +69,5 @@ class Yolo3Detection {
};
}}
#endif /* YOLODETECTION_H*/
-64
View File
@@ -1,64 +0,0 @@
#include<cassert>
class SoftmaxRT : public IPlugin {
public:
SoftmaxRT(const tk::dnn::dataDim_t* dim) {
assert(dim != nullptr);
this->dim.n = dim->n;
this->dim.c = dim->c;
this->dim.h = dim->h;
this->dim.w = dim->w;
this->dim.l = dim->l;
}
~SoftmaxRT(){
}
int getNbOutputs() const override {
return 1;
}
Dims getOutputDimensions(int index, const Dims* inputs, int nbInputDims) override {
return DimsNCHW{this->dim.n,this->dim.c,this->dim.h,this->dim.w };
}
void configure(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, int maxBatchSize) override {
}
int initialize() override {
return 0;
}
virtual void terminate() override {
}
virtual size_t getWorkspaceSize(int maxBatchSize) const override {
return 0;
}
virtual int enqueue(int batchSize, const void*const * inputs, void** outputs, void* workspace, cudaStream_t stream) override {
dnnType *srcData = (dnnType*)reinterpret_cast<const dnnType*>(inputs[0]);
dnnType *dstData = reinterpret_cast<dnnType*>(outputs[0]);
return 0;
}
virtual size_t getSerializationSize() override {
return 5*sizeof(int);
}
virtual void serialize(void* buffer) override {
char *buf = reinterpret_cast<char*>(buffer);
tk::dnn::writeBUF(buf, this->dim.n);
tk::dnn::writeBUF(buf, this->dim.c);
tk::dnn::writeBUF(buf, this->dim.h);
tk::dnn::writeBUF(buf, this->dim.w);
tk::dnn::writeBUF(buf, this->dim.l);
}
dataDim_t dim;
};