pub struct GraphormerConfig {
pub in_dim: usize,
pub hidden_dim: usize,
pub num_heads: usize,
pub num_layers: usize,
pub ffn_dim: usize,
pub max_distance: usize,
pub max_degree: usize,
pub max_edge_types: usize,
pub dropout: f64,
pub layer_norm_eps: f64,
}Expand description
Configuration for the Graphormer model.
Fields§
§in_dim: usizeInput feature dimension
Hidden dimension (also the dimension for Q, K, V)
num_heads: usizeNumber of attention heads
num_layers: usizeNumber of Graphormer layers
ffn_dim: usizeFFN intermediate dimension (typically 4 * hidden_dim)
max_distance: usizeMaximum SPD for spatial encoding
max_degree: usizeMaximum node degree for centrality encoding
max_edge_types: usizeMaximum edge types for edge encoding
dropout: f64Dropout rate (stored for reference, applied stochastically)
layer_norm_eps: f64Layer norm epsilon
Trait Implementations§
Source§impl Clone for GraphormerConfig
impl Clone for GraphormerConfig
Source§fn clone(&self) -> GraphormerConfig
fn clone(&self) -> GraphormerConfig
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 GraphormerConfig
impl Debug for GraphormerConfig
Auto Trait Implementations§
impl Freeze for GraphormerConfig
impl RefUnwindSafe for GraphormerConfig
impl Send for GraphormerConfig
impl Sync for GraphormerConfig
impl Unpin for GraphormerConfig
impl UnsafeUnpin for GraphormerConfig
impl UnwindSafe for GraphormerConfig
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> 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