GOOD.networks.models.GINvirtualnode
The Graph Neural Network from the “Neural Message Passing for Quantum Chemistry” paper.
Classes
|
The virtual node feature encoder for vGIN. |
|
The Graph Neural Network from the "Neural Message Passing for Quantum Chemistry" paper. |
|
The vGIN encoder for non-molecule data, using the |
|
vGIN feature extractor using the |
|
The vGIN encoder for molecule data, using the |
- class GOOD.networks.models.GINvirtualnode.VirtualNodeEncoder(config: Union[CommonArgs, Munch], *args, **kwargs)[source]
Bases:
Module
The virtual node feature encoder for vGIN.
- Parameters
config (Union[CommonArgs, Munch]) – munchified dictionary of args (
config.model.dim_hidden
,config.model.dropout_rate
)
- class GOOD.networks.models.GINvirtualnode.vGIN(config: Union[CommonArgs, Munch])[source]
Bases:
GNNBasic
The Graph Neural Network from the “Neural Message Passing for Quantum Chemistry” paper.
- Parameters
config (Union[CommonArgs, Munch]) – munchified dictionary of args (
config.model.dim_hidden
,config.model.model_layer
,config.dataset.dim_node
,config.dataset.num_classes
,config.dataset.dataset_type
,config.model.dropout_rate
)
- forward(*args, **kwargs) Tensor [source]
The vGIN 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
- class GOOD.networks.models.GINvirtualnode.vGINEncoder(config: Union[CommonArgs, Munch], **kwargs)[source]
Bases:
GINEncoder
,VirtualNodeEncoder
The vGIN encoder for non-molecule data, using the
vGINConv
operator for message passing.- Parameters
config (Union[CommonArgs, Munch]) – munchified dictionary of args (
config.model.dim_hidden
,config.model.model_layer
,config.dataset.dim_node
,config.model.dropout_rate
)
- class GOOD.networks.models.GINvirtualnode.vGINFeatExtractor(config: Union[CommonArgs, Munch], **kwargs)[source]
Bases:
GINFeatExtractor
vGIN feature extractor using the
vGINEncoder
orvGINMolEncoder
.- Parameters
config (Union[CommonArgs, Munch]) – munchified dictionary of args (
config.model.dim_hidden
,config.model.model_layer
,config.dataset.dim_node
,config.dataset.dataset_type
,config.model.dropout_rate
)**kwargs – without_readout will output node features instead of graph features.
- class GOOD.networks.models.GINvirtualnode.vGINMolEncoder(config: Union[CommonArgs, Munch], **kwargs)[source]
Bases:
GINMolEncoder
,VirtualNodeEncoder
The vGIN encoder for molecule data, using the
vGINEConv
operator for message passing.- Parameters
config (Union[CommonArgs, Munch]) – munchified dictionary of args (
config.model.dim_hidden
,config.model.model_layer
,config.model.dropout_rate
)
- forward(x, edge_index, edge_attr, batch, batch_size, **kwargs)[source]
The vGIN encoder for molecule data.
- Parameters
x (Tensor) – node features
edge_index (Tensor) – edge indices
edge_attr (Tensor) – edge attributes
batch (Tensor) – batch indicator
batch_size (int) – Batch size.
- Returns (Tensor):
node feature representations