-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathonlytest.py
More file actions
30 lines (21 loc) · 751 Bytes
/
onlytest.py
File metadata and controls
30 lines (21 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#------------------------------------------------
# Test a model already trained
# Author: Pablo Villanueva Domingo
# Last update: 5/11/21
#------------------------------------------------
from main import *
from Hyperparameters.params_TNG_CV import params
#--- MAIN ---#
time_ini = time.time()
for path in ["Plots", "Models", "Outputs"]:
if not os.path.exists(path):
os.mkdir(path)
# Test a pretrained model
training = False
params[6] = training
main(params)
# Test the pretrained model in the other CAMELS suite
# Simulation suite, choose between "IllustrisTNG" and "SIMBA"
params[7] = changesuite(params[7])
main(params, testsuite=True)
print("Finished. Time elapsed:",datetime.timedelta(seconds=time.time()-time_ini))