Skip to content

Commit bb213ea

Browse files
committed
refactor code in train_surrogate and add example of hyperparameter file for it
1 parent db30bac commit bb213ea

File tree

7 files changed

+653
-696
lines changed

7 files changed

+653
-696
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ data/
3535
*.csv
3636
code/dataset/
3737
code/results/
38-
38+
!surrogate_hp.json
3939

4040
# PyInstaller
4141
# Usually these files are written by a python script from a template

code/gcn-training.ipynb

Lines changed: 484 additions & 453 deletions
Large diffs are not rendered by default.

code/inference_surrogate.py

Whitespace-only changes.

code/surrogate_hp.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"dataset_path": "third_dataset/",
3+
"device": "cpu",
4+
"developer_mode": false,
5+
"n_models": 1300,
6+
7+
"upper_margin": 0.8,
8+
"lower_margin": 0.2,
9+
10+
"train_size": 0.8,
11+
"batch_size": 8,
12+
13+
"acc_num_epochs": 20,
14+
"acc_lr": 1e-2,
15+
"acc_final_lr": 1e-4,
16+
"acc_dropout": 0.2,
17+
"acc_n_heads": 16,
18+
"draw_fig_acc": true,
19+
20+
"div_num_epochs": 10,
21+
"div_lr": 1e-3,
22+
"div_final_lr": 1e-5,
23+
"div_dropout": 0.1,
24+
"div_n_heads": 4,
25+
"margin": 1,
26+
"output_dim": 128,
27+
"draw_fig_div": false
28+
}
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)