MolCA: Molecular Graph-Language Modeling with Cross-Modal Projector and Uni-Modal Adapter
Paper
•
2310.12798
•
Published
•
4
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
The second version of the PubChem324k Dataset used in the paper: MolCA: Molecular Graph-Language Modeling with Cross-Modal Projector and Uni-Modal Adapter
import torch
from torch_geometric.data import InMemoryDataset
class PubChemDataset(InMemoryDataset):
def __init__(self, path):
super(PubChemDataset, self).__init__()
self.data, self.slices = torch.load(path)
def __getitem__(self, idx):
return self.get(idx)
if __name__ == '__main__':
dataset = PubChemDataset('./pretrain.pt')
print(dataset[0])