sbs_resnet.h 2.04 KB
Newer Older
dengjb's avatar
update  
dengjb committed
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once

#include <map>
#include "struct.h"
#include "module.h"
#include "NvInfer.h"
using namespace nvinfer1;

namespace fastrt {
    class backbone_sbsR18_distill : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR18_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg){}
        ~backbone_sbsR18_distill() = default;
        ILayer* topology(INetworkDefinition *network, 
            std::map<std::string, Weights>& weightMap, 
            ITensor& input) override; 
    };

    class backbone_sbsR34_distill : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR34_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR34_distill() = default;
        ILayer* topology(INetworkDefinition *network, 
            std::map<std::string, Weights>& weightMap, 
            ITensor& input) override; 
    };

    class backbone_sbsR50_distill : public Module { 
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR50_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR50_distill() = default;
        ILayer* topology(INetworkDefinition *network, 
            std::map<std::string, Weights>& weightMap, 
            ITensor& input) override;
    };

    class backbone_sbsR34 : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR34(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR34() = default;
        ILayer* topology(INetworkDefinition *network, 
            std::map<std::string, Weights>& weightMap, 
            ITensor& input) override;
    };

    class backbone_sbsR50 : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR50(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR50() = default;
        ILayer* topology(INetworkDefinition *network, 
            std::map<std::string, Weights>& weightMap, 
            ITensor& input) override;
    };
     
}