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 | |
from torch.nn import Parameter, functional as F | |
from torch_geometric.nn import MessagePassing | |
from torch_geometric.nn.inits import glorot, zeros | |
from torch_geometric.utils import remove_self_loops, add_self_loops, softmax | |
from torch_geometric.utils.num_nodes import maybe_num_nodes | |
from torch_scatter import scatter_max, scatter_add | |
def softmax(src, index, num_nodes=None): |
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
from collections import deque | |
import heapq | |
import unittest | |
import warnings | |
class Graph: | |
UNDIRECTED = 0 | |
DIRECTED = 1 | |
class Vertex: |