-
Notifications
You must be signed in to change notification settings - Fork 1
/
2_train_networks_probability_keepBest.py
66 lines (57 loc) · 2.26 KB
/
2_train_networks_probability_keepBest.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import logging, os, sys
from DeepWP.train import MultiExperiments
from DeepWP.utils import get_args, pathcheck, filecheck
if __name__ == "__main__":
logger = logging.getLogger(__name__)
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
level=logging.INFO)
# ================= Initialize Args Config
args = get_args()
# ================= Basic Configuration
args.main_dir = pathcheck('mainKeepbest')
args.save = True
args.plt_show = False
args.forecast_type = 'probability'
# Debug Args:
args.debug = True
# ================= Dataset
args.filename = "dataset\WC04-1-2.5-Full.dat"
args.filepath = filecheck(args.filename)
args.fileformat = 1
args.data_source = "EXP"
args.Hs = 12.0
args.delta_t = 320
args.remove_time = 180
args.timespan = 4096
args.location = [0]
args.scaling_train = True
args.n_covariate = 1
# Debug Args:
args.debug_id = 0
# ================= Model Basic Configuration
args.model_configfile = "config\deepwp_6.csv"
args.model_configpath = filecheck(args.model_configfile)
args.n_modeltype = 5
# ================= Training Hyperparameters
# Basic Args:
args.epochs = 1
args.eval_standard = 'ndrmse'
args.early_stop = 20
# Keep Best Args:
args.keep_best = True
args.keep_bestNum = 5
# Optimizer Args:
args.optimizer_mode = 1
args.weightDecay = 1e-8
args.scheduler_dynamic = True
# Probability Class Args:
args.pdf = 'gaussian'
# ================= Testing Hyperparameters
args.test_number = 0
args.test_all = True
# ================= Initialize Experiments
experiment = MultiExperiments(args)
# Train and Test
experiment.LoopModels()