[−][src]Struct rust_bert::gpt2::Gpt2Config
GPT2 model configuration
Defines the GPT2 model architecture (e.g. number of layers, hidden layer size, vocab size...). Shared between GPT and GPT2 models
Fields
attn_pdrop: Option<f64>
embd_pdrop: Option<f64>
afn: Option<GptActivation>
initializer_range: f64
layer_norm_epsilon: f64
n_ctx: i64
n_embd: i64
n_head: i64
n_layer: i64
n_positions: i64
num_labels: Option<i64>
output_past: Option<bool>
output_attentions: Option<bool>
resid_pdrop: Option<f64>
vocab_size: i64
Trait Implementations
impl Config<Gpt2Config> for Gpt2Config
[src]
impl Debug for Gpt2Config
[src]
impl<'de> Deserialize<'de> for Gpt2Config
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Gpt2Config
[src]
Auto Trait Implementations
impl RefUnwindSafe for Gpt2Config
impl Send for Gpt2Config
impl Sync for Gpt2Config
impl Unpin for Gpt2Config
impl UnwindSafe for Gpt2Config
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,