pub struct RobertaEmbeddingsConfig { /* private fields */ }Expand description
RoBERTa embeddings configuration.
Implementations§
Source§impl RobertaEmbeddingsConfig
impl RobertaEmbeddingsConfig
Sourcepub fn padding_id(self, padding_id: u32) -> Self
pub fn padding_id(self, padding_id: u32) -> Self
Padding token id.
Default: 1
Sourcepub fn transformer_embeddings(
self,
transformer_embeddings: Box<dyn BuildEmbeddings>,
) -> Self
pub fn transformer_embeddings( self, transformer_embeddings: Box<dyn BuildEmbeddings>, ) -> Self
Transformer embeddings configuration.
Default: TransformerEmbeddingsConfig::default()
Trait Implementations§
Source§impl BuildEmbeddings for RobertaEmbeddingsConfig
impl BuildEmbeddings for RobertaEmbeddingsConfig
fn build(&self, vb: VarBuilder<'_>) -> Result<Box<dyn Embeddings>, BoxedError>
Source§impl Debug for RobertaEmbeddingsConfig
impl Debug for RobertaEmbeddingsConfig
Auto Trait Implementations§
impl Freeze for RobertaEmbeddingsConfig
impl !RefUnwindSafe for RobertaEmbeddingsConfig
impl !Send for RobertaEmbeddingsConfig
impl !Sync for RobertaEmbeddingsConfig
impl Unpin for RobertaEmbeddingsConfig
impl !UnwindSafe for RobertaEmbeddingsConfig
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