Unverified Commit a0730530 authored by Mufei Li's avatar Mufei Li Committed by GitHub
Browse files

Update main.py (#5460)

parent 4534650f
...@@ -463,12 +463,12 @@ if __name__ == "__main__": ...@@ -463,12 +463,12 @@ if __name__ == "__main__":
# reconstruct the graph for ogbl-collab data for validation edge augmentation and coalesce # reconstruct the graph for ogbl-collab data for validation edge augmentation and coalesce
if args.dataset == "ogbl-collab": if args.dataset == "ogbl-collab":
graph.edata.pop("year")
# float edata for to_simple transform
graph.edata["weight"] = graph.edata["weight"].to(torch.float)
if args.use_valedges_as_input: if args.use_valedges_as_input:
val_edges = split_edge["valid"]["edge"] val_edges = split_edge["valid"]["edge"]
row, col = val_edges.t() row, col = val_edges.t()
# float edata for to_simple transform
graph.edata.pop("year")
graph.edata["weight"] = graph.edata["weight"].to(torch.float)
val_weights = torch.ones(size=(val_edges.size(0), 1)) val_weights = torch.ones(size=(val_edges.size(0), 1))
graph.add_edges( graph.add_edges(
torch.cat([row, col]), torch.cat([row, col]),
......
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