| 24 | using PoolType = layers::types::PoolType; |
| 25 | |
| 26 | class BertModel { |
| 27 | public: |
| 28 | BertModel(const std::string &filename, DLDeviceType device_type, |
| 29 | size_t n_layers, int64_t n_heads); |
| 30 | ~BertModel(); |
| 31 | |
| 32 | std::vector<float> operator()( |
| 33 | const std::vector<std::vector<int64_t>> &inputs, |
| 34 | const std::vector<std::vector<int64_t>> &poistion_ids, |
| 35 | const std::vector<std::vector<int64_t>> &segment_ids, |
| 36 | PoolType pooling = PoolType::kFirst, bool use_pooler = false) const; |
| 37 | |
| 38 | private: |
| 39 | struct Impl; |
| 40 | std::unique_ptr<Impl> m_; |
| 41 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected