carate.models package
Submodules
carate.models.base_model module
- class carate.models.base_model.Model(dim: int, num_classes: int, num_features: int)[source]
Bases:
Module- abstract forward(x: int, edge_index: int, batch: int, edge_weight=None) Tensor[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.cc_classification module
cgc_classification model is named after the structure of the graph neural network. The graph neural network is structured with a convolutional , graph attention, and another convolutional layer. The cgc_classificatin model was the model tested int the publication Introducing CARATE: Finally speaking chemistry.
- author:
Julian M. Kleber
- class carate.models.cc_classification.Net(dim: int, num_features: int, num_classes: int, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.cc_regression module
cc_regression model is named after the structure of the graph neural network. The graph neural network is structured with a convolutional, and another convolutional layer. The cgc_classificatin model was the model tested int the publication Introducing CARATE: Finally speaking chemistry.
- class carate.models.cc_regression.Net(dim: int, num_features: int, num_classes: int, *args, **kwargs)[source]
Bases:
Model- forward(x: float, edge_index: int, batch: int, edge_weight=None) float[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.cgc_classification module
cgc_classification model is named after the structure of the graph neural network. The graph neural network is structured with a convolutional , graph attention, and another convolutional layer. The cgc_classificatin model was the model tested int the publication Introducing CARATE: Finally speaking chemistry.
- author:
Julian M. Kleber
- class carate.models.cgc_classification.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.cgc_classification_jax module
carate.models.cgc_regression module
cgc_regression model is named after the structure of the graph neural network. The graph neural network is structured with a convolutional , graph attention, and another convolutional layer. The cgc_classificatin model was the model tested int the publication Introducing CARATE: Finally speaking chemistry.
- class carate.models.cgc_regression.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
Model- forward(x: float, edge_index: int, batch: int, edge_weight=None) float[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.cgc_regression_jax module
carate.models.g_classification module
- class carate.models.g_classification.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.g_regression module
- class carate.models.g_regression.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward: float = 0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.gatv2_classification module
- class carate.models.gatv2_classification.Net(dim: int, num_features: int, num_classes: int, heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.gatv2_regression module
- class carate.models.gatv2_regression.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.gcc_classification module
cgc_classification model is named after the structure of the graph neural network. The graph neural network is structured with a convolutional , graph attention, and another convolutional layer. The cgc_classificatin model was the model tested int the publication Introducing CARATE: Finally speaking chemistry.
- author:
Julian M. Kleber
- class carate.models.gcc_classification.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.gcc_regression module
cgc_classification model is named after the structure of the graph neural network. The graph neural network is structured with a convolutional , graph attention, and another convolutional layer. The cgc_classificatin model was the model tested int the publication Introducing CARATE: Finally speaking chemistry.
- author:
Julian M. Kleber
- class carate.models.gcc_regression.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward=0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.graph_transformer_classification module
- class carate.models.graph_transformer_classification.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward: float = 0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
carate.models.graph_transformer_regression module
- class carate.models.graph_transformer_regression.Net(dim: int, num_features: int, num_classes: int, num_heads: int = 16, dropout_gat: float = 0.6, dropout_forward: float = 0.5, *args, **kwargs)[source]
Bases:
ModelThe Net is the core algorithm and needs a constructor and a forward pass. The train, test and evaluation methods are implemented in the evaluation module with the Evaluation class. The net takes plain graph transformer and applies common postprocessing.
- forward(x, edge_index, batch, edge_weight=None)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.