Last active
September 27, 2022 00:25
-
-
Save tomonori-masui/c8d3f2c302a40c8bb34b6f39fd049b73 to your computer and use it in GitHub Desktop.
Run GCN training and evaluation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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