pub struct SqueezeBertEncoder { /* private fields */ }Expand description
SqueezeBERT encoder.
Even though SqueezeBERT uses [batch_size, hidden_size, seq_len] format internally, the encoder accepts the regular [batch_size, seq_len, hidden_size] format.
Implementations§
Source§impl SqueezeBertEncoder
impl SqueezeBertEncoder
pub fn new<'a>( vs: impl Borrow<PathExt<'a>>, config: &SqueezeBertConfig, ) -> Result<Self, TransformerError>
Trait Implementations§
Source§impl Debug for SqueezeBertEncoder
impl Debug for SqueezeBertEncoder
Auto Trait Implementations§
impl Freeze for SqueezeBertEncoder
impl RefUnwindSafe for SqueezeBertEncoder
impl Send for SqueezeBertEncoder
impl !Sync for SqueezeBertEncoder
impl Unpin for SqueezeBertEncoder
impl UnwindSafe for SqueezeBertEncoder
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