Unverified Commit 9fe5092c authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

lintrunner (#5326)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent 9836f78e
...@@ -46,7 +46,6 @@ class DGLRoutingLayer(nn.Module): ...@@ -46,7 +46,6 @@ class DGLRoutingLayer(nn.Module):
self.g.nodes[self.out_indx].data["v"] = squash( self.g.nodes[self.out_indx].data["v"] = squash(
self.g.nodes[self.out_indx].data["s"], dim=1 self.g.nodes[self.out_indx].data["s"], dim=1
) )
# step 4 (line 7) # step 4 (line 7)
v = th.cat( v = th.cat(
[self.g.nodes[self.out_indx].data["v"]] * self.in_nodes, dim=0 [self.g.nodes[self.out_indx].data["v"]] * self.in_nodes, dim=0
...@@ -78,7 +77,6 @@ def init_graph(in_nodes, out_nodes, f_size, device="cpu"): ...@@ -78,7 +77,6 @@ def init_graph(in_nodes, out_nodes, f_size, device="cpu"):
# add edges use edge broadcasting # add edges use edge broadcasting
for u in in_indx: for u in in_indx:
g.add_edges(u, out_indx) g.add_edges(u, out_indx)
g = g.to(device) g = g.to(device)
g.edata["b"] = th.zeros(in_nodes * out_nodes, 1).to(device) g.edata["b"] = th.zeros(in_nodes * out_nodes, 1).to(device)
return g return g
...@@ -23,7 +23,6 @@ g.graph_data["out_indx"] = out_indx ...@@ -23,7 +23,6 @@ g.graph_data["out_indx"] = out_indx
# add edges use edge broadcasting # add edges use edge broadcasting
for u in out_indx: for u in out_indx:
g.add_edges(in_indx, u) g.add_edges(in_indx, u)
# init states # init states
f_size = 4 f_size = 4
g.ndata["v"] = th.zeros(all_nodes, f_size) g.ndata["v"] = th.zeros(all_nodes, f_size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment