This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn.functional as F | |
from torchvision.datasets import MNIST | |
from torchvision.transforms import ToTensor | |
from torch.utils.data import DataLoader | |
from torch_geometric.utils import grid | |
from torch_geometric.nn import SplineConv | |
train_dataset = MNIST('/tmp/MNIST', train=True, transform=ToTensor()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reaches around 92% after 5 epochs. | |
import torch | |
import torch.nn.functional as F | |
from torchvision.datasets import MNIST as MNISTImage | |
from torchvision.transforms import ToTensor | |
from torch_geometric.data import InMemoryDataset, Data, DataLoader | |
from torch_geometric.utils import grid | |
from torch_geometric.transforms import Cartesian | |
from torch_geometric.nn import (SplineConv, max_pool, max_pool_x, graclus, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path as osp | |
from six.moves import urllib | |
import errno | |
import tarfile | |
from rdkit import Chem | |
from rdkit.Chem import ChemicalFeatures | |
from rdkit import RDConfig | |
import torch | |
from rdkit.Chem import AllChem # noqa |
NewerOlder