-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SAGEStack added * Update SAGEStack and test accuracy * Simplify sage inputs Co-authored-by: Massimiliano Lupo Pasini <[email protected]> Co-authored-by: Sam Reeve <[email protected]>
- Loading branch information
1 parent
2977ad2
commit 5931f04
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
############################################################################## | ||
# Copyright (c) 2021, Oak Ridge National Laboratory # | ||
# All rights reserved. # | ||
# # | ||
# This file is part of HydraGNN and is distributed under a BSD 3-clause # | ||
# license. For the licensing terms see the LICENSE file in the top-level # | ||
# directory. # | ||
# # | ||
# SPDX-License-Identifier: BSD-3-Clause # | ||
############################################################################## | ||
|
||
import torch | ||
import torch.nn.functional as F | ||
import torch.nn as nn | ||
from torch.nn import ModuleList | ||
from torch_geometric.nn import SAGEConv, BatchNorm | ||
|
||
from .Base import Base | ||
|
||
|
||
class SAGEStack(Base): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
def get_conv(self, input_dim, output_dim): | ||
return SAGEConv( | ||
in_channels=input_dim, | ||
out_channels=output_dim, | ||
) | ||
|
||
def __str__(self): | ||
return "SAGEStack" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters