pub struct ReformerConfig {Show 40 fields
pub attention_head_size: i64,
pub attn_layers: Vec<AttentionType>,
pub axial_norm_std: f64,
pub axial_pos_embds: bool,
pub axial_pos_embds_dim: Vec<i64>,
pub axial_pos_shape: Vec<i64>,
pub chunk_size_lm_head: i64,
pub chunk_size_feed_forward: Option<i64>,
pub eos_token_id: i64,
pub pad_token_id: i64,
pub forced_bos_token_id: Option<i64>,
pub forced_eos_token_id: Option<i64>,
pub feed_forward_size: i64,
pub hash_seed: Option<i64>,
pub hidden_act: Activation,
pub hidden_dropout_prob: f64,
pub hidden_size: i64,
pub initializer_range: Option<f64>,
pub is_decoder: bool,
pub layer_norm_eps: Option<f64>,
pub max_position_embeddings: i64,
pub vocab_size: i64,
pub num_attention_heads: i64,
pub num_buckets: Value,
pub local_attn_chunk_length: Option<i64>,
pub local_num_chunks_after: Option<i64>,
pub local_num_chunks_before: Option<i64>,
pub local_attention_probs_dropout_prob: Option<f64>,
pub lsh_attn_chunk_length: Option<i64>,
pub lsh_num_chunks_after: Option<i64>,
pub lsh_num_chunks_before: Option<i64>,
pub lsh_attention_probs_dropout_prob: Option<f64>,
pub num_hashes: i64,
pub num_hidden_layers: i64,
pub use_cache: Option<bool>,
pub id2label: Option<HashMap<i64, String>>,
pub label2id: Option<HashMap<String, i64>>,
pub output_attentions: Option<bool>,
pub output_hidden_states: Option<bool>,
pub decoder_start_token_id: Option<i64>,
}
Expand description
§Reformer model configuration
Defines the Reformer model architecture (e.g. number of layers, hidden layer size, label mapping…)
Fields§
§attention_head_size: i64
§attn_layers: Vec<AttentionType>
§axial_norm_std: f64
§axial_pos_embds: bool
§axial_pos_embds_dim: Vec<i64>
§axial_pos_shape: Vec<i64>
§chunk_size_lm_head: i64
§chunk_size_feed_forward: Option<i64>
§eos_token_id: i64
§pad_token_id: i64
§forced_bos_token_id: Option<i64>
§forced_eos_token_id: Option<i64>
§feed_forward_size: i64
§hash_seed: Option<i64>
§initializer_range: Option<f64>
§is_decoder: bool
§layer_norm_eps: Option<f64>
§max_position_embeddings: i64
§vocab_size: i64
§num_attention_heads: i64
§num_buckets: Value
§local_attn_chunk_length: Option<i64>
§local_num_chunks_after: Option<i64>
§local_num_chunks_before: Option<i64>
§local_attention_probs_dropout_prob: Option<f64>
§lsh_attn_chunk_length: Option<i64>
§lsh_num_chunks_after: Option<i64>
§lsh_num_chunks_before: Option<i64>
§lsh_attention_probs_dropout_prob: Option<f64>
§num_hashes: i64
§use_cache: Option<bool>
§id2label: Option<HashMap<i64, String>>
§label2id: Option<HashMap<String, i64>>
§output_attentions: Option<bool>
§decoder_start_token_id: Option<i64>
Trait Implementations§
Source§impl Clone for ReformerConfig
impl Clone for ReformerConfig
Source§fn clone(&self) -> ReformerConfig
fn clone(&self) -> ReformerConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Config for ReformerConfig
impl Config for ReformerConfig
Source§impl Debug for ReformerConfig
impl Debug for ReformerConfig
Source§impl Default for ReformerConfig
impl Default for ReformerConfig
Source§impl<'de> Deserialize<'de> for ReformerConfig
impl<'de> Deserialize<'de> for ReformerConfig
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 ReformerConfig
impl RefUnwindSafe for ReformerConfig
impl Send for ReformerConfig
impl Sync for ReformerConfig
impl Unpin for ReformerConfig
impl UnwindSafe for ReformerConfig
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,
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