pub struct GATLayer {
pub weights: Vec<Vec<f64>>,
pub attention_weights: Vec<f64>,
pub out_dim: usize,
pub negative_slope: f64,
pub use_activation: bool,
}Expand description
Graph Attention Network layer - legacy Vec API
Fields§
§weights: Vec<Vec<f64>>Node transformation matrix W (out_dim × in_dim)
attention_weights: Vec<f64>Attention vector a (2 * out_dim)
out_dim: usizeOutput dimension
negative_slope: f64LeakyReLU negative slope
use_activation: boolWhether to apply ELU activation on output
Implementations§
Trait Implementations§
Source§impl MessagePassingLayer for GATLayer
impl MessagePassingLayer for GATLayer
Source§fn aggregate(
&self,
node_features: &[Vec<f64>],
adjacency: &[(usize, usize, f64)],
n_nodes: usize,
) -> Result<Vec<Vec<f64>>>
fn aggregate( &self, node_features: &[Vec<f64>], adjacency: &[(usize, usize, f64)], n_nodes: usize, ) -> Result<Vec<Vec<f64>>>
Aggregate messages from the neighborhood of each node
Auto Trait Implementations§
impl Freeze for GATLayer
impl RefUnwindSafe for GATLayer
impl Send for GATLayer
impl Sync for GATLayer
impl Unpin for GATLayer
impl UnsafeUnpin for GATLayer
impl UnwindSafe for GATLayer
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