728x90 반응형 Pytorch Geometric2 [PyG] GIN 예제 코드 Introduction GIN은 graph-level task에 적합한 GNN 모델이다. protein dataset을 이용하여 graph classification을 수행해보자. Setup import gc import os import random import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch_geometric.nn import GCNConv, SAGEConv, GATConv, GINConv, global_add_pool, global_mean_pool from torch_geometric.datasets import TUDataset from torch_geometric.l.. 2023. 7. 12. [CS224w] Colab 2 - PyG, OGB, GNN Device 런타임 > 런타임 유형 변경 > 하드웨어 가속기 > GPU로 설정하고 저장 Setup import torch import os print("PyTorch has version {}".format(torch.__version__)) PyTorch has version 1.13.1+cu116 # Install torch geometric if 'IS_GRADESCOPE_ENV' not in os.environ: !pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.13.1+cu116.html !pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.13.. 2023. 3. 21. 이전 1 다음 728x90 반응형