/// Construct new ALBERT embeddings with the given variable store
/// and ALBERT configuration.
Construct new ALBERT embeddings with the given variable store
and ALBERT configuration.
Construct new ALBERT embeddings with the given variable store and ALBERT configuration .
pub fn new<'a>(vs: impl Borrow<Path<'a>>, config: &AlbertConfig) -> Self {
        let vs = vs.borrow();
        // BERT uses the hidden size as the vocab size.
        let mut bert_config: BertConfig = config.into();
        bert_config.hidden_size = config.embedding_size;
        let embeddings = BertEmbeddings::new(vs, &bert_config);
        AlbertEmbeddings { embeddings }
    }
pub fn new < ' a > ( vs : impl Borrow < Path < ' a > > , config : & AlbertConfig ) -> Self { let vs = vs . borrow ( ) ; // BERT uses the hidden size as the vocab size. let mut bert_config : BertConfig = config . into ( ) ; bert_config . hidden_size = config . embedding_size ; let embeddings = BertEmbeddings :: new ( vs , & bert_config ) ; AlbertEmbeddings { embeddings } }
Construct new ALBERT embeddings with the given variable store
and ALBERT configuration.
Construct new ALBERT embeddings with the given variable store and ALBERT configuration .
vs
impl Borrow<Path<'a>>
config
&AlbertConfig