pub struct FNetConfig {Show 18 fields
pub vocab_size: i64,
pub hidden_size: i64,
pub num_hidden_layers: i64,
pub intermediate_size: i64,
pub hidden_act: Activation,
pub hidden_dropout_prob: f64,
pub max_position_embeddings: i64,
pub type_vocab_size: i64,
pub initializer_range: f64,
pub layer_norm_eps: Option<f64>,
pub pad_token_id: Option<i64>,
pub bos_token_id: Option<i64>,
pub eos_token_id: Option<i64>,
pub decoder_start_token_id: Option<i64>,
pub id2label: Option<HashMap<i64, String>>,
pub label2id: Option<HashMap<String, i64>>,
pub output_attentions: Option<bool>,
pub output_hidden_states: Option<bool>,
}
Expand description
§FNet model configuration
Defines the FNet model architecture (e.g. number of layers, hidden layer size, label mapping…)
Fields§
§vocab_size: i64
§intermediate_size: i64
§max_position_embeddings: i64
§type_vocab_size: i64
§initializer_range: f64
§layer_norm_eps: Option<f64>
§pad_token_id: Option<i64>
§bos_token_id: Option<i64>
§eos_token_id: Option<i64>
§decoder_start_token_id: Option<i64>
§id2label: Option<HashMap<i64, String>>
§label2id: Option<HashMap<String, i64>>
§output_attentions: Option<bool>
Trait Implementations§
Source§impl Config for FNetConfig
impl Config for FNetConfig
Source§impl Debug for FNetConfig
impl Debug for FNetConfig
Source§impl Default for FNetConfig
impl Default for FNetConfig
Source§impl<'de> Deserialize<'de> for FNetConfig
impl<'de> Deserialize<'de> for FNetConfig
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
Auto Trait Implementations§
impl Freeze for FNetConfig
impl RefUnwindSafe for FNetConfig
impl Send for FNetConfig
impl Sync for FNetConfig
impl Unpin for FNetConfig
impl UnwindSafe for FNetConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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