torch_geometric.nn.models.GITMol

class GITMol[source]

Bases: Module

来自“GIT-Mol: A Multi-modal Large Language Model for Molecular Science with Graph, Image, and Text”论文的GITMol模型。

注意

有关使用 GITMol 的示例,请参见 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]

定义每次调用时执行的计算。

应该由所有子类覆盖。

注意

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:

Tensor