MCPcopy Create free account

hub / github.com/XiaShan1227/Graphormer / functions

Functions30 in github.com/XiaShan1227/Graphormer

↓ 13 callersMethodcprint
(self, text)
parameter.py:41
↓ 5 callersMethod__init__
:param edge_dim: edge feature matrix number of dimension
layer.py:77
↓ 2 callersFunctionall_pairs_shortest_path
(G)
model.py:50
↓ 2 callersMethoddecrease_to_max_value
限制节点度的最大值
layer.py:45
↓ 1 callersFunctionbatched_shortest_path_distance
(data)
model.py:63
↓ 1 callersMethodcompute_a
Query-Key product(normalization)
layer.py:165
↓ 1 callersMethoddot_product
(self, x1, x2)
layer.py:105
↓ 1 callersFunctionexp_init
实验初始化
main.py:97
↓ 1 callersFunctionfloyd_warshall_source_to_all
Floyd-Warshall算法查询最短路径(BFS遍历图)
model.py:20
↓ 1 callersFunctionload_ESOL
(args)
data.py:12
↓ 1 callersFunctionparse_args
()
parameter.py:12
↓ 1 callersFunctionshortest_path_distance
(data: Data)
model.py:57
↓ 1 callersFunctiontable_printer
绘制参数表格
parameter.py:50
↓ 1 callersFunctiontest
测试模型
main.py:65
↓ 1 callersFunctiontrain
(args, IO, train_loader, num_node_features, num_edge_features)
main.py:18
Method__init__
:param max_in_degree: max in degree of nodes :param max_out_degree: max out degree of nodes :param node_dim: hidden dimension
layer.py:15
Method__init__
:param max_path_distance: max pairwise distance between nodes
layer.py:53
Method__init__
:param dim_in: node feature matrix input number of dimension :param dim_q: query node feature matrix input number dimension :
layer.py:110
Method__init__
:param num_heads: number of attention heads :param dim_in: node feature matrix input number of dimension :param dim_q: query
layer.py:179
Method__init__
:param node_dim: node feature matrix input number of dimension :param edge_dim: edge feature matrix input number of dimension
layer.py:215
Method__init__
(self, path)
parameter.py:38
Method__init__
:param num_layers: number of Graphormer layers :param input_node_dim: input dimension of node features :param node_dim: hidde
model.py:85
Methodclose
(self)
parameter.py:46
Methodforward
:param x: node feature matrix :param edge_index: edge_index of graph (adjacency list) :return: torch.Tensor, node embeddings
layer.py:28
Methodforward
:param x: node feature matrix :param paths: pairwise node paths :return: torch.Tensor, spatial Encoding matrix
layer.py:61
Methodforward
:param x: node feature matrix :param edge_attr: edge feature matrix :param edge_paths: pairwise node paths in edge indexes
layer.py:86
Methodforward
:param query: node feature matrix :param key: node feature matrix :param value: node feature matrix :param edge_attr:
layer.py:125
Methodforward
:param x: node feature matrix :param edge_attr: edge feature matrix :param b: spatial Encoding matrix :param edge_pat
layer.py:193
Methodforward
h′(l) = MHA(LN(h(l−1))) + h(l−1) h(l) = FFN(LN(h′(l))) + h′(l) :param x: node feature matrix :param edge_attr: edge
layer.py:239
Methodforward
:param data: input graph of batch of graphs :return: torch.Tensor, output node embeddings
model.py:134