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§
Source§impl AlbertEncoder
impl AlbertEncoder
pub fn new<'a>( vs: impl Borrow<PathExt<'a>>, config: &AlbertConfig, ) -> Result<Self, TransformerError>
Trait Implementations§
Source§impl Debug for AlbertEncoder
impl Debug for AlbertEncoder
Auto Trait Implementations§
impl Freeze for AlbertEncoder
impl RefUnwindSafe for AlbertEncoder
impl Send for AlbertEncoder
impl !Sync for AlbertEncoder
impl Unpin for AlbertEncoder
impl UnwindSafe for AlbertEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more