-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
layers.h
46 lines (38 loc) · 1.25 KB
/
layers.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
45
46
#pragma once
#include <map>
#include <math.h>
#include <assert.h>
#include "NvInfer.h"
#include "cuda_runtime_api.h"
using namespace nvinfer1;
namespace trtxapi {
ITensor* MeanStd(INetworkDefinition *network,
std::map<std::string, Weights>& weightMap,
ITensor* input,
const std::string lname,
const float* mean,
const float* std,
const bool div255);
IScaleLayer* addBatchNorm2d(INetworkDefinition *network,
std::map<std::string, Weights>& weightMap,
ITensor& input,
const std::string lname,
const float eps);
IScaleLayer* addInstanceNorm2d(INetworkDefinition *network,
std::map<std::string, Weights>& weightMap,
ITensor& input,
const std::string lname,
const float eps);
IConcatenationLayer* addIBN(INetworkDefinition *network,
std::map<std::string, Weights>& weightMap,
ITensor& input,
const std::string lname);
IActivationLayer* bottleneck_ibn(INetworkDefinition *network,
std::map<std::string, Weights>& weightMap,
ITensor& input,
const int inch,
const int outch,
const int stride,
const std::string lname,
const std::string ibn);
}