GOOD.networks.models.GSATGNNs
Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism <https://arxiv.org/abs/2201.12987>`_.
Functions
|
Modified from https://github.com/wuyxin/dir-gnn. |
|
Modified from https://github.com/wuyxin/dir-gnn. |
- GOOD.networks.models.GSATGNNs.clear_masks(model: Module)[source]
Modified from https://github.com/wuyxin/dir-gnn.
- GOOD.networks.models.GSATGNNs.set_masks(mask: Tensor, model: Module)[source]
Modified from https://github.com/wuyxin/dir-gnn.
Classes
|
|
|
|
|
The GIN virtual node version of GSAT. |
|
- class GOOD.networks.models.GSATGNNs.BatchSequential(*args: Module)[source]
- class GOOD.networks.models.GSATGNNs.BatchSequential(arg: OrderedDict[str, Module])
Bases:
Sequential
- forward(inputs, batch)[source]
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class GOOD.networks.models.GSATGNNs.ExtractorMLP(config: Union[CommonArgs, Munch])[source]
Bases:
Module
- forward(emb, edge_index, batch)[source]
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class GOOD.networks.models.GSATGNNs.GSATGIN(config: Union[CommonArgs, Munch])[source]
Bases:
GNNBasic
- forward(*args, **kwargs)[source]
The GSAT model implementation.
- Parameters
*args (list) – argument list for the use of arguments_read. Refer to
arguments_read
**kwargs (dict) – key word arguments for the use of arguments_read. Refer to
arguments_read
- Returns (Tensor):
Label predictions and other results for loss calculations.
- class GOOD.networks.models.GSATGNNs.GSATvGIN(config: Union[CommonArgs, Munch])[source]
Bases:
GSATGIN
The GIN virtual node version of GSAT.
- class GOOD.networks.models.GSATGNNs.MLP(channels, dropout, bias=True)[source]
Bases:
BatchSequential