MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / PositionEmbedding

Method PositionEmbedding

src/layers/common.cc:182–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180
181
182 PositionEmbedding::PositionEmbedding(const models::Model& model, const std::string& scope)
183 : _encoding(model.get_variable(scope + "/encodings"))
184 {
185 }
186
187 const StorageView& PositionEmbedding::get_position_encoding(dim_t) {
188 return _encoding;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected