Struct syntaxdot_transformers::models::albert::AlbertEncoder
source · [−]pub struct AlbertEncoder { /* private fields */ }
Expand description
ALBERT encoder.
This encoder uses the BERT encoder with two modifications:
- The embeddings are projected to fit the hidden layer size.
- Weights are shared between layers.
Implementations
sourceimpl AlbertEncoder
impl AlbertEncoder
pub fn new<'a>(
vs: impl Borrow<PathExt<'a>>,
config: &AlbertConfig
) -> Result<Self, TransformerError>
Trait Implementations
sourceimpl Debug for AlbertEncoder
impl Debug for AlbertEncoder
Auto Trait Implementations
impl RefUnwindSafe for AlbertEncoder
impl Send for AlbertEncoder
impl !Sync for AlbertEncoder
impl Unpin for AlbertEncoder
impl UnwindSafe for AlbertEncoder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more