duan8/inception/inceptionv4/utils.h
makaveli 4d630ed599
Inceptionv4 (#505)
* add: structure inception v4

* fix: camelcase naming

* fix and optimize

* add: doInference def

* define inception layers

* fix: spacing

* add: inception network def

* fix layers

* create net

* validate

* add README

* update readme

* typo

* create dir inception
2021-04-26 11:06:52 +08:00

27 lines
608 B
C++

# ifndef TRTX_UTILS_H
# define TRTX_UTILS_H
#include <map>
#include "NvInfer.h"
#include "cuda_runtime_api.h"
#include "assert.h"
#include <fstream>
#include <iostream>
#include <memory>
#ifndef CUDA_CHECK
#define CUDA_CHECK(callstr)\
{\
cudaError_t error_code = callstr;\
if (error_code != cudaSuccess) {\
std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__;\
assert(0);\
}\
}
#endif // CUDA_CHECK
using namespace nvinfer1;
std::map<std::string, Weights> loadWeights(const std::string input);
#endif // TRTX_UTILS_H