torch_geometric.nn.models.GITMol
- class GITMol[source]
Bases:
Module
The GITMol model from the “GIT-Mol: A Multi-modal Large Language Model for Molecular Science with Graph, Image, and Text” paper.
Note
For an example of using
GITMol
, see examples/llm/git_mol.py.- forward(x: Tensor, edge_index: Tensor, batch: Tensor, edge_attr: Optional[Tensor], smiles: List[str], images: Tensor, captions: List[str]) 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
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.- Return type: