Struct rust_bert::distilbert::DistilBertConfig [−][src]
pub struct DistilBertConfig {Show 22 fields
pub activation: Activation,
pub attention_dropout: f64,
pub dim: i64,
pub dropout: f64,
pub hidden_dim: i64,
pub id2label: Option<HashMap<i64, String>>,
pub initializer_range: f32,
pub is_decoder: Option<bool>,
pub label2id: Option<HashMap<String, i64>>,
pub max_position_embeddings: i64,
pub n_heads: i64,
pub n_layers: i64,
pub output_attentions: Option<bool>,
pub output_hidden_states: Option<bool>,
pub output_past: Option<bool>,
pub qa_dropout: f64,
pub seq_classif_dropout: f64,
pub sinusoidal_pos_embds: bool,
pub tie_weights_: bool,
pub torchscript: Option<bool>,
pub use_bfloat16: Option<bool>,
pub vocab_size: i64,
}Expand description
DistilBERT model configuration
Defines the DistilBERT model architecture (e.g. number of layers, hidden layer size, label mapping…)
Fields
activation: Activationattention_dropout: f64dim: i64dropout: f64id2label: Option<HashMap<i64, String>>initializer_range: f32is_decoder: Option<bool>label2id: Option<HashMap<String, i64>>max_position_embeddings: i64n_heads: i64n_layers: i64output_attentions: Option<bool>output_past: Option<bool>qa_dropout: f64seq_classif_dropout: f64sinusoidal_pos_embds: booltie_weights_: booltorchscript: Option<bool>use_bfloat16: Option<bool>vocab_size: i64Trait Implementations
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 RefUnwindSafe for DistilBertConfig
impl Send for DistilBertConfig
impl Sync for DistilBertConfig
impl Unpin for DistilBertConfig
impl UnwindSafe for DistilBertConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
