2021-01-30 15:40:05 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include "struct.h"
|
2021-02-13 21:14:14 +08:00
|
|
|
#include "module.h"
|
2021-01-30 15:40:05 +08:00
|
|
|
#include "NvInfer.h"
|
|
|
|
using namespace nvinfer1;
|
|
|
|
|
|
|
|
namespace fastrt {
|
2021-04-12 15:05:21 +08:00
|
|
|
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;
|
|
|
|
};
|
2021-01-30 15:40:05 +08:00
|
|
|
|
2021-02-13 21:14:14 +08:00
|
|
|
class backbone_sbsR34_distill : public Module {
|
2021-02-27 16:40:04 +08:00
|
|
|
private:
|
|
|
|
FastreidConfig& _modelCfg;
|
2021-02-13 21:14:14 +08:00
|
|
|
public:
|
2021-02-27 16:40:04 +08:00
|
|
|
backbone_sbsR34_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
|
2021-02-13 21:14:14 +08:00
|
|
|
~backbone_sbsR34_distill() = default;
|
|
|
|
ILayer* topology(INetworkDefinition *network,
|
|
|
|
std::map<std::string, Weights>& weightMap,
|
2021-02-27 16:40:04 +08:00
|
|
|
ITensor& input) override;
|
2021-02-13 21:14:14 +08:00
|
|
|
};
|
|
|
|
|
2021-02-27 16:40:04 +08:00
|
|
|
class backbone_sbsR50_distill : public Module {
|
|
|
|
private:
|
|
|
|
FastreidConfig& _modelCfg;
|
2021-02-13 21:14:14 +08:00
|
|
|
public:
|
2021-02-27 16:40:04 +08:00
|
|
|
backbone_sbsR50_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
|
2021-02-13 21:14:14 +08:00
|
|
|
~backbone_sbsR50_distill() = default;
|
|
|
|
ILayer* topology(INetworkDefinition *network,
|
|
|
|
std::map<std::string, Weights>& weightMap,
|
2021-02-27 16:40:04 +08:00
|
|
|
ITensor& input) override;
|
2021-02-13 21:14:14 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class backbone_sbsR34 : public Module {
|
2021-02-27 16:40:04 +08:00
|
|
|
private:
|
|
|
|
FastreidConfig& _modelCfg;
|
2021-02-13 21:14:14 +08:00
|
|
|
public:
|
2021-02-27 16:40:04 +08:00
|
|
|
backbone_sbsR34(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
|
2021-02-13 21:14:14 +08:00
|
|
|
~backbone_sbsR34() = default;
|
|
|
|
ILayer* topology(INetworkDefinition *network,
|
|
|
|
std::map<std::string, Weights>& weightMap,
|
2021-02-27 16:40:04 +08:00
|
|
|
ITensor& input) override;
|
2021-02-13 21:14:14 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class backbone_sbsR50 : public Module {
|
2021-02-27 16:40:04 +08:00
|
|
|
private:
|
|
|
|
FastreidConfig& _modelCfg;
|
2021-02-13 21:14:14 +08:00
|
|
|
public:
|
2021-02-27 16:40:04 +08:00
|
|
|
backbone_sbsR50(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
|
2021-02-13 21:14:14 +08:00
|
|
|
~backbone_sbsR50() = default;
|
|
|
|
ILayer* topology(INetworkDefinition *network,
|
|
|
|
std::map<std::string, Weights>& weightMap,
|
2021-02-27 16:40:04 +08:00
|
|
|
ITensor& input) override;
|
2021-02-13 21:14:14 +08:00
|
|
|
};
|
|
|
|
|
2021-01-30 15:40:05 +08:00
|
|
|
}
|