2021-02-13 21:14:14 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "struct.h"
|
|
|
|
#include "module.h"
|
2021-02-13 21:28:29 +08:00
|
|
|
#include "IPoolingLayerRT.h"
|
2021-02-13 21:14:14 +08:00
|
|
|
|
|
|
|
namespace fastrt {
|
|
|
|
|
|
|
|
class ModuleFactory {
|
|
|
|
public:
|
|
|
|
ModuleFactory() = default;
|
|
|
|
~ModuleFactory() = default;
|
|
|
|
|
2021-02-27 16:40:04 +08:00
|
|
|
std::unique_ptr<Module> createBackbone(FastreidConfig& modelCfg);
|
|
|
|
std::unique_ptr<Module> createHead(FastreidConfig& modelCfg);
|
2021-02-13 21:14:14 +08:00
|
|
|
};
|
|
|
|
|
2021-02-13 21:28:29 +08:00
|
|
|
class LayerFactory {
|
|
|
|
public:
|
|
|
|
LayerFactory() = default;
|
|
|
|
~LayerFactory() = default;
|
|
|
|
|
|
|
|
std::unique_ptr<IPoolingLayerRT> createPoolingLayer(const FastreidPoolingType& pooltype);
|
|
|
|
};
|
|
|
|
|
2021-02-13 21:14:14 +08:00
|
|
|
}
|