Commit 905059c1 authored by Carlos GO's avatar Carlos GO
Browse files

learning early stop

parent 205c394e
...@@ -146,7 +146,7 @@ def train_model(model, criterion, optimizer, device, train_loader, test_loader, ...@@ -146,7 +146,7 @@ def train_model(model, criterion, optimizer, device, train_loader, test_loader,
""" """
epochs_from_best = 0 epochs_from_best = 0
early_stop_threshold = 80 early_stop_threshold = 10
start_time = time.time() start_time = time.time()
best_loss = sys.maxsize best_loss = sys.maxsize
......
...@@ -123,7 +123,7 @@ def ablation_results(): ...@@ -123,7 +123,7 @@ def ablation_results():
graph_ids = pickle.load(open(f'../results/{run}/splits.p', 'rb')) graph_ids = pickle.load(open(f'../results/{run}/splits.p', 'rb'))
acc, ranks_this = decoy_test(model, decoys, edge_map, 32, acc, ranks_this = decoy_test(model, decoys, edge_map, 32,
test_graphlist=graph_ids['test'], test_graphlist=graph_ids['train'],
test_graph_path=graph_dir, test_graph_path=graph_dir,
shuffle=shuffle) shuffle=shuffle)
ranks.extend(ranks_this) ranks.extend(ranks_this)
......
Supports Markdown
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