Skip to content

Commit

Permalink
Update ogbn_train.py
Browse files Browse the repository at this point in the history
  • Loading branch information
puririshi98 authored Sep 17, 2024
1 parent e7db357 commit 85b32bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/ogbn_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test(loader: NeighborLoader, val_steps=None) -> float:

for epoch in range(1, num_epochs + 1):
train_start = time.time()
loss, train_acc = train(epoch)
loss, _ = train(epoch)
train_end = time.time()
train_times.append(train_end - train_start)

Expand All @@ -235,8 +235,7 @@ def test(loader: NeighborLoader, val_steps=None) -> float:
print(
f'Epoch {epoch:02d}, Loss: {loss:.4f}, Train Time: {train_end - train_start:.4f}s'
)
print(f'Train: {train_acc * 100.0:.4f}%, Val: {val_acc * 100.0:.4f}%, '
f'Test: {test_acc * 100.0:.4f}%')
print('Val: {val_acc * 100.0:.4f}%,', f'Test: {test_acc * 100.0:.4f}%')

if val_acc > best_val:
best_val = val_acc
Expand Down

0 comments on commit 85b32bf

Please sign in to comment.