pub struct HgnnNetwork { /* private fields */ }Expand description
Multi-layer HGNN network.
Layers alternate convolution and ReLU activation; the final layer has no activation applied (the caller is free to apply softmax / sigmoid as appropriate for the downstream task).
Implementations§
Source§impl HgnnNetwork
impl HgnnNetwork
Sourcepub fn forward(
&self,
incidence: &Array2<f64>,
node_feats: &Array2<f64>,
edge_weights: Option<&Array1<f64>>,
) -> Result<Array2<f64>>
pub fn forward( &self, incidence: &Array2<f64>, node_feats: &Array2<f64>, edge_weights: Option<&Array1<f64>>, ) -> Result<Array2<f64>>
Forward pass through all layers.
ReLU is applied after every hidden layer; the output of the last layer is returned without activation.
§Arguments
incidence– incidence matrix H:[n_nodes × n_edges]node_feats– node feature matrix X:[n_nodes × in_dim]edge_weights– optional per-hyperedge weight vector
§Returns
Output feature matrix: [n_nodes × out_dim]
Auto Trait Implementations§
impl Freeze for HgnnNetwork
impl RefUnwindSafe for HgnnNetwork
impl Send for HgnnNetwork
impl Sync for HgnnNetwork
impl Unpin for HgnnNetwork
impl UnsafeUnpin for HgnnNetwork
impl UnwindSafe for HgnnNetwork
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> 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