File size: 642 Bytes
e449660 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# README
## Description
The second version of the PubChem324k Dataset used in the paper: [MolCA: Molecular Graph-Language Modeling with Cross-Modal Projector and Uni-Modal Adapter](https://arxiv.org/abs/2310.12798)
## Load Example
```python
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])
``` |