Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/THUDM/CogDL
/ forward
Method
forward
docs/source/tutorial_cn/examples/4custom_gnn.py:59–62 ·
view source on GitHub ↗
(self, graph, x)
Source
from the content-addressed store, hash-verified
57
self.fc = torch.nn.Linear(in_feats, out_feats)
58
59
def
forward(self, graph, x):
60
h = self.fc(x)
61
h = spmm(graph, h)
62
return
h
63
64
# %%
65
# 将自定义的GNN模型与Cogdl一起使用
Callers
nothing calls this directly
Calls
1
spmm
Function · 0.90
Tested by
no test coverage detected