Skip to content

Instantly share code, notes, and snippets.

@tomonori-masui
Last active September 27, 2022 00:25
Show Gist options
  • Save tomonori-masui/c8d3f2c302a40c8bb34b6f39fd049b73 to your computer and use it in GitHub Desktop.
Save tomonori-masui/c8d3f2c302a40c8bb34b6f39fd049b73 to your computer and use it in GitHub Desktop.
Run GCN training and evaluation
model = Net(dataset.num_features, 128, 64).to(device)
optimizer = torch.optim.Adam(params=model.parameters(), lr=0.01)
criterion = torch.nn.BCEWithLogitsLoss()
model = train_link_predictor(model, train_data, val_data, optimizer, criterion)
test_auc = eval_link_predictor(model, test_data)
print(f"Test: {test_auc:.3f}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment