| 12 | }; |
| 13 | |
| 14 | class EmbeddingModule { |
| 15 | public: |
| 16 | explicit EmbeddingModule(EmbeddingConfig config); |
| 17 | |
| 18 | const EmbeddingConfig & config() const noexcept; |
| 19 | const core::ModuleSchema & schema() const noexcept; |
| 20 | |
| 21 | core::TensorValue build( |
| 22 | core::ModuleBuildContext & ctx, |
| 23 | const core::TensorValue & indices, |
| 24 | const core::TensorValue & weight) const; |
| 25 | |
| 26 | static const core::ModuleSchema & static_schema() noexcept; |
| 27 | |
| 28 | private: |
| 29 | EmbeddingConfig config_; |
| 30 | }; |
| 31 | |
| 32 | struct IndexedEmbeddingConfig { |
| 33 | int64_t num_embeddings = 0; |
no outgoing calls
no test coverage detected