pub struct Config {Show 31 fields
pub vocab_size: usize,
pub hidden_size: usize,
pub num_hidden_layers: usize,
pub num_attention_heads: usize,
pub intermediate_size: usize,
pub hidden_act: HiddenAct,
pub hidden_dropout_prob: f64,
pub attention_probs_dropout_prob: f64,
pub max_position_embeddings: usize,
pub type_vocab_size: usize,
pub initializer_range: f64,
pub layer_norm_eps: f64,
pub relative_attention: bool,
pub max_relative_positions: isize,
pub pad_token_id: Option<usize>,
pub position_biased_input: bool,
pub pos_att_type: Vec<String>,
pub position_buckets: Option<isize>,
pub share_att_key: Option<bool>,
pub attention_head_size: Option<usize>,
pub embedding_size: Option<usize>,
pub norm_rel_ebd: Option<String>,
pub conv_kernel_size: Option<usize>,
pub conv_groups: Option<usize>,
pub conv_act: Option<String>,
pub id2label: Option<Id2Label>,
pub label2id: Option<Label2Id>,
pub pooler_dropout: Option<f64>,
pub pooler_hidden_act: Option<HiddenAct>,
pub pooler_hidden_size: Option<usize>,
pub cls_dropout: Option<f64>,
}Fields§
§vocab_size: usize§num_attention_heads: usize§intermediate_size: usize§attention_probs_dropout_prob: f64§max_position_embeddings: usize§type_vocab_size: usize§initializer_range: f64§layer_norm_eps: f64§relative_attention: bool§max_relative_positions: isize§pad_token_id: Option<usize>§position_biased_input: bool§pos_att_type: Vec<String>§position_buckets: Option<isize>§attention_head_size: Option<usize>§embedding_size: Option<usize>§norm_rel_ebd: Option<String>§conv_kernel_size: Option<usize>§conv_groups: Option<usize>§conv_act: Option<String>§id2label: Option<Id2Label>§label2id: Option<Label2Id>§pooler_dropout: Option<f64>§cls_dropout: Option<f64>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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