GOOD.networks.models.DANNs
GIN and GIN-virtual implementation of the DANN algorithm from “Domain-Adversarial Training of Neural Networks” paper
Classes
|
The Graph Neural Network modified from the "Domain-Adversarial Training of Neural Networks" paper and "How Powerful are Graph Neural Networks?" paper. |
|
The Graph Neural Network modified from the "Domain-Adversarial Training of Neural Networks" paper and "Neural Message Passing for Quantum Chemistry" paper. |
|
Gradient reverse layer for DANN algorithm. |
- class GOOD.networks.models.DANNs.DANN_GIN(config: Union[CommonArgs, Munch])[source]
Bases:
GNNBasicThe Graph Neural Network modified from the “Domain-Adversarial Training of Neural Networks” paper and “How Powerful are Graph Neural Networks?” paper.
- Parameters
config (Union[CommonArgs, Munch]) – munchified dictionary of args (
config.model.dim_hidden,config.model.model_layer,config.dataset.num_envs,config.dataset.dim_node,config.dataset.num_classes,config.dataset.dataset_type,config.model.dropout_rate)
- forward(*args, **kwargs) Tuple[Tensor, Tensor][source]
The DANN-GIN 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, domain predictions]
- class GOOD.networks.models.DANNs.DANN_vGIN(config: Union[CommonArgs, Munch])[source]
Bases:
DANN_GINThe Graph Neural Network modified from the “Domain-Adversarial Training of Neural Networks” paper and “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_envs,config.dataset.num_classes,config.dataset.dataset_type,config.model.dropout_rate)
- class GOOD.networks.models.DANNs.GradientReverseLayerF(*args, **kwargs)[source]
Bases:
FunctionGradient reverse layer for DANN algorithm.