pub struct TransformerLayerConfig {
pub attention: AttentionConfig,
pub feed_forward: FeedForwardConfig,
pub pre_norm: bool,
}Expand description
Configuration for a complete transformer layer
Fields§
§attention: AttentionConfigAttention configuration
feed_forward: FeedForwardConfigFeed-forward configuration
pre_norm: boolWhether to use pre-layer normalization (vs post)
Implementations§
Trait Implementations§
Source§impl Clone for TransformerLayerConfig
impl Clone for TransformerLayerConfig
Source§fn clone(&self) -> TransformerLayerConfig
fn clone(&self) -> TransformerLayerConfig
Returns a duplicate 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 Debug for TransformerLayerConfig
impl Debug for TransformerLayerConfig
Source§impl<'de> Deserialize<'de> for TransformerLayerConfig
impl<'de> Deserialize<'de> for TransformerLayerConfig
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
Source§impl PartialEq for TransformerLayerConfig
impl PartialEq for TransformerLayerConfig
Source§impl Serialize for TransformerLayerConfig
impl Serialize for TransformerLayerConfig
impl StructuralPartialEq for TransformerLayerConfig
Auto Trait Implementations§
impl Freeze for TransformerLayerConfig
impl RefUnwindSafe for TransformerLayerConfig
impl Send for TransformerLayerConfig
impl Sync for TransformerLayerConfig
impl Unpin for TransformerLayerConfig
impl UnwindSafe for TransformerLayerConfig
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