embedding_head.h 675 Bytes
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
#pragma once

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

namespace fastrt {

    class embedding_head : public Module {
    private:
        FastreidConfig& _modelCfg;
        std::unique_ptr<LayerFactory> _layerFactory;

    public:
        embedding_head(FastreidConfig& modelCfg);
        embedding_head(FastreidConfig& modelCfg, std::unique_ptr<LayerFactory> layerFactory);
        ~embedding_head() = default;

        ILayer* topology(INetworkDefinition *network, 
            std::map<std::string, Weights>& weightMap,
            ITensor& input) override;
    };

}