Struct syntaxdot_transformers::models::bert::BertEmbeddings
source · pub struct BertEmbeddings { /* private fields */ }
Expand description
Construct the embeddings from word, position and token_type embeddings.
Implementations§
source§impl BertEmbeddings
impl BertEmbeddings
sourcepub fn new<'a>(
vs: impl Borrow<PathExt<'a>>,
config: &BertConfig
) -> Result<Self, TransformerError>
pub fn new<'a>(
vs: impl Borrow<PathExt<'a>>,
config: &BertConfig
) -> Result<Self, TransformerError>
Construct new Bert embeddings with the given variable store and Bert configuration.