diff --git a/Make_models/configs/LSTMs/random_sequence_LSTM.json b/Make_models/configs/LSTMs/random_sequence_LSTM.json deleted file mode 100644 index 24f663a..0000000 --- a/Make_models/configs/LSTMs/random_sequence_LSTM.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "generator": true, - "num_of_ts": 500, - "num_of_ts_for_data": 550, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 20, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "return_sequence": [ - true, - true, - true - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 5, - "": "------------------------------------", - "num_epochs": 100, - "batch_size": 80, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "random_sequence", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": true, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/LSTM.json b/Make_models/configs/Test/LSTM.json deleted file mode 100644 index 5c38e2b..0000000 --- a/Make_models/configs/Test/LSTM.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "generator": false, - "num_of_ts": 500, - "num_of_ts_for_data": 550, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 20, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "return_sequence": [ - true, - true, - true - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 5, - "": "------------------------------------", - "num_epochs": 10, - "batch_size": 80, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_random_sequence", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": true, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": true, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/config.json b/Make_models/configs/Test/config.json deleted file mode 100644 index 6ee5b87..0000000 --- a/Make_models/configs/Test/config.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "GPU": { - "number": "2, 3", - "multi_gpu": true, - "gpu_count": 2 - }, - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "num_of_ts": 100, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 10, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 5, - "": "------------------------------------", - "num_epochs": 1, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": true, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": true, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/config_LSTM.json b/Make_models/configs/Test/config_LSTM.json deleted file mode 100644 index 39f8100..0000000 --- a/Make_models/configs/Test/config_LSTM.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "GPU": { - "number": "2", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "num_of_ts": 10, - "num_of_ts_for_data": 550, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 5, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 5, - "": "------------------------------------", - "num_epochs": 1, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": true, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": true, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/config_for_CV.json b/Make_models/configs/Test/config_for_CV.json deleted file mode 100644 index f34f56f..0000000 --- a/Make_models/configs/Test/config_for_CV.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 1, - "aumont_kind": 100, - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "learning_rate": 0.001, - "optimizer": "SGD", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "loss": "gdl_mse" - }, - "trainer": { - "use_CV": true, - "n_splits": 5, - "name": "simple_mnist_trainer.SimpleMnistModelTrainer", - "num_epochs": 1, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test_CV", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "earlystopping": true, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "reduceLR": true, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/config_stateful.json b/Make_models/configs/Test/config_stateful.json deleted file mode 100644 index 4fccabb..0000000 --- a/Make_models/configs/Test/config_stateful.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "num_of_ts": 10, - "sequence": 5, - "num_of_ts_for_data": 550, - "kind_num": 10, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 1, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "stateful": true, - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 10, - "batch_size": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/new_CNN.json b/Make_models/configs/Test/new_CNN.json deleted file mode 100644 index d4d2baf..0000000 --- a/Make_models/configs/Test/new_CNN.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "GPU": { - "number": "0", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "convert_part_chanel_nm": 1, - "less_than_72": true, - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 200, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/test_gpu/config_1.json b/Make_models/configs/Test/test_gpu/config_1.json deleted file mode 100644 index 4ff2df4..0000000 --- a/Make_models/configs/Test/test_gpu/config_1.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "GPU": { - "number": "2, 3", - "multi_gpu": true, - "gpu_count": 2 - }, - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 5, - "": "------------------------------------", - "num_epochs": 10, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_GPU_1", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": true, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- redeuce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/Test/test_gpu/config_2.json b/Make_models/configs/Test/test_gpu/config_2.json deleted file mode 100644 index 5dd3261..0000000 --- a/Make_models/configs/Test/test_gpu/config_2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "GPU": { - "number": "3", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": true, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 5, - "": "------------------------------------", - "num_epochs": 10, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_GPU_2", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": true, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- redeuce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/compression_ratio/MS_FC_CNN.json b/Make_models/configs/compression_ratio/MS_FC_CNN.json deleted file mode 100644 index 327e5ac..0000000 --- a/Make_models/configs/compression_ratio/MS_FC_CNN.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "GPU": { - "number": "2, 3", - "multi_gpu": true, - "gpu_count": 2 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "fc": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "fc_num": 2, - "uni_num": [ - 64, - 16 - ], - "encoded_size": 2, - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 200, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/compression_ratio/config.json b/Make_models/configs/compression_ratio/config.json deleted file mode 100644 index aa6c070..0000000 --- a/Make_models/configs/compression_ratio/config.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "GPU": { - "number": "2, 3", - "multi_gpu": true, - "gpu_count": 2 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 200, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/compression_ratio/config_for_less_72.json b/Make_models/configs/compression_ratio/config_for_less_72.json deleted file mode 100644 index c7b1aa0..0000000 --- a/Make_models/configs/compression_ratio/config_for_less_72.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "GPU": { - "number": "3", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "convert_part_chanel_nm": 2, - "less_than_72": false, - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 200, - "batch_size": 50, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} diff --git a/Make_models/configs/compression_ratio/config_for_less_72.json~ b/Make_models/configs/compression_ratio/config_for_less_72.json~ deleted file mode 100644 index 41705f9..0000000 --- a/Make_models/configs/compression_ratio/config_for_less_72.json~ +++ /dev/null @@ -1,90 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "convert_part_chanel_nm": 2, - "less_than_72": false, - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 200, - "batch_size": 50, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} diff --git a/Make_models/configs/number_of_shapes/config.json b/Make_models/configs/config_CNN_AE.json similarity index 100% rename from Make_models/configs/number_of_shapes/config.json rename to Make_models/configs/config_CNN_AE.json diff --git a/Make_models/configs/LSTMs/20_sequence_LSTM.json b/Make_models/configs/config_LSTM.json similarity index 100% rename from Make_models/configs/LSTMs/20_sequence_LSTM.json rename to Make_models/configs/config_LSTM.json diff --git a/Make_models/configs/number_of_reference_time_steps/config.json b/Make_models/configs/number_of_reference_time_steps/config.json deleted file mode 100644 index 80e3083..0000000 --- a/Make_models/configs/number_of_reference_time_steps/config.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "num_of_ts": 500, - "num_of_ts_for_data": 550, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 5, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 100, - "batch_size": 1000, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/number_of_shapes/config.json~ b/Make_models/configs/number_of_shapes/config.json~ deleted file mode 100644 index aa6c070..0000000 --- a/Make_models/configs/number_of_shapes/config.json~ +++ /dev/null @@ -1,88 +0,0 @@ -{ - "GPU": { - "number": "2, 3", - "multi_gpu": true, - "gpu_count": 2 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "num_of_ts": 500, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "x_num": 384, - "y_num": 192, - "phys_num": 3, - "kind_num": 80, - "aumont_kind": 100, - "with_shape": false, - "train": true, - "ratio_tr_te": 0.2, - "": "--------- generator condition ---------", - "generator": true - }, - "model": { - "name": "CNN-AE", - "multi_scale": true, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "relu", - "filsize": [ - 3, - 5, - 9 - ], - "layer_nm": [ - 1, - 4, - 2 - ], - "chanel_nm": [ - 16, - 8, - 4 - ], - "loss": "gdl_mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 200, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/CNN_autoencoder/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 10, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/number_of_shapes_LSTM/config.json b/Make_models/configs/number_of_shapes_LSTM/config.json deleted file mode 100644 index f716a02..0000000 --- a/Make_models/configs/number_of_shapes_LSTM/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "GPU": { - "number": "3", - "multi_gpu": false, - "gpu_count": 0 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-2_dataset.csv", - "generator": false, - "num_of_ts": 500, - "num_of_ts_for_data": 1000, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 20, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "return_sequence": [ - true, - true, - true - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 100, - "batch_size": 100, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/size_of_delta_t/config.json b/Make_models/configs/size_of_delta_t/config.json deleted file mode 100644 index 48c58c0..0000000 --- a/Make_models/configs/size_of_delta_t/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 0 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-2_dataset.csv", - "generator": false, - "num_of_ts": 500, - "num_of_ts_for_data": 1000, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 20, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "return_sequence": [ - true, - true, - true - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 100, - "batch_size": 1000, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/size_of_sequence/config.json b/Make_models/configs/size_of_sequence/config.json deleted file mode 100644 index b074bd9..0000000 --- a/Make_models/configs/size_of_sequence/config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-2_dataset.csv", - "generator": false, - "num_of_ts": 500, - "num_of_ts_for_data": 1000, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 20, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "return_sequence": [ - true, - true, - true - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": true, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 100, - "batch_size": 1000, - "shuffle": true, - "verbose": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "maxlen_20", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/stateful_LSTM/stateful_config_01.json b/Make_models/configs/stateful_LSTM/stateful_config_01.json deleted file mode 100644 index 90dbca3..0000000 --- a/Make_models/configs/stateful_LSTM/stateful_config_01.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "num_of_ts": 500, - "sequence": 100, - "num_of_ts_for_data": 550, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 1, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "stateful": true, - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 30, - "batch_size": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "Test_test", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/configs/stateful_LSTM/stateful_config_02.json b/Make_models/configs/stateful_LSTM/stateful_config_02.json deleted file mode 100644 index 569eafc..0000000 --- a/Make_models/configs/stateful_LSTM/stateful_config_02.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "GPU": { - "number": "1", - "multi_gpu": false, - "gpu_count": 1 - }, - "save": { - "val_time_save": false, - "history_save": true - }, - "data_loader": { - "dataset_name": "72_values_MS-BN-1_dataset.csv", - "num_of_ts": 500, - "sequence": 400, - "num_of_ts_for_data": 550, - "kind_num": 80, - "": "---------------------------------------------------------", - "": "num_of_ts + time_step * (maxlen - 1) < num_of_ts_for_data", - "": "---------------------------------------------------------", - "maxlen": 1, - "time_step": 1, - "data_size": 72, - "path_to_present_dir": "/home/hasegawa/work/Various_shapes_of_bluff_body", - "with_shape": true, - "train": true, - "ratio_tr_te": 0.2 - }, - "model": { - "name": "LSTM", - "stateful": true, - "layer_num": 3, - "unit_num": [ - 128, - 128, - 128 - ], - "shape_input_layer": 1, - "optimizer": "adam", - "": "---- if you use SGD as optimizer ----", - "lr": 0.01, - "momentum": 0.0, - "decay": 0.0, - "nesterov": false, - "": "-------------------------------------", - "act": "tanh", - "loss": "mse" - }, - "trainer": { - "": "--------- cross validation ---------", - "use_CV": false, - "n_splits": 4, - "": "------------------------------------", - "num_epochs": 30, - "batch_size": 1 - }, - "callbacks": { - "": "--------- model checkpoint ---------", - "modelcheckpoint": true, - "save_file": "/LSTM/", - "model_name": "stateful_LSTM_sequence_500", - "cp_monitor": "val_loss", - "cp_save_best_only": true, - "cp_verbose": 1, - "": "--------- early stopping ---------", - "earlystopping": false, - "es_monitor": "val_loss", - "es_patience": 40, - "es_verbose": 1, - "": "--------- tensor borad ---------", - "tensorboard": false, - "tensorboard_log_dir": "", - "tensorboard_write_graph": true, - "": "--------- reduce LR ---------", - "reduceLR": false, - "reduceLR_monitor": "val_loss", - "": "new_LR = LR * reduceLR_factor", - "reduceLR_factor": 0.2, - "reduceLR_patience": 20, - "reduceLR_verbose": 1 - } -} \ No newline at end of file diff --git a/Make_models/trainers/Trainer.py~ b/Make_models/trainers/Trainer.py~ deleted file mode 100644 index ab28ba6..0000000 --- a/Make_models/trainers/Trainer.py~ +++ /dev/null @@ -1,505 +0,0 @@ -import os -import time -import pandas as pd -from keras.callbacks import ( - ModelCheckpoint, EarlyStopping, - ReduceLROnPlateau, TensorBoard -) -from keras import backend as K -from utils.utils import MultiGPUCheckpointCallback -from sklearn.model_selection import KFold -import numpy as np -import sys - -class trainer(): - def __init__(self, model, data, config): - self.model, self.base_model = model.make_model() - self.data = data - self.config = config - self.callbacks = [] - self.val_loss_time = { - 'val_loss': [], - 'time': [] - } - self.init_callbacks() - - def init_callbacks(self): - if self.config.callbacks.modelcheckpoint and \ - not self.config.GPU.multi_gpu: - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/', - exist_ok=True - ) - self.callbacks.append( - ModelCheckpoint( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/' + - self.config.callbacks.model_name + - '.hdf5', - monitor=self.config.callbacks.cp_monitor, - save_best_only=self.config.callbacks.cp_save_best_only, - verbose=self.config.callbacks.cp_verbose - ) - ) - if self.config.callbacks.modelcheckpoint and \ - self.config.GPU.multi_gpu: - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/', - exist_ok=True - ) - self.callbacks.append( - MultiGPUCheckpointCallback( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/' + - self.config.callbacks.model_name + - '.hdf5', - self.base_model, - monitor=self.config.callbacks.cp_monitor, - save_best_only=self.config.callbacks.cp_save_best_only, - verbose=self.config.callbacks.cp_verbose - ) - ) - if self.config.callbacks.earlystopping: - self.callbacks.append( - EarlyStopping( - monitor=self.config.callbacks.es_monitor, - patience=self.config.callbacks.es_patience, - verbose=self.config.callbacks.es_verbose - ) - ) - - if self.config.callbacks.tensorboard: - self.callbacks.append( - TensorBoard( - log_dir=self.config.callbacks.tensorboard_log_dir, - write_graph=self.config.callbacks.tensorboard_write_graph, - ) - ) - - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - self.callbacks.append( - ReduceLROnPlateau( - monitor=self.config.callbacks.reduceLR_monitor, - factor=self.config.callbacks.reduceLR_factor, - patience=self.config.callbacks.reduceLR_patience, - verbose=self.config.callbacks.reduceLR_verbose, - ) - ) - - def train(self): - if self.config.data_loader.generator: - self.x_test, self.y_test = \ - self.data.make_val_data() - - print('\n-----------------Training Condition----------------\n') - if self.config.GPU.multi_gpu: - print('This model will be trained using ' + str(self.config.GPU.gpu_count) + ' GPUs.') - print('This model will be trained by fit_generator.') - print('Number of epochs : ' + str(self.config.trainer.num_epochs)) - if type(self.x_test) is not list: - print('X test data : ', self.x_test.shape) - if type(self.y_test) is not list: - print('Y test data : ', self.y_test.shape) - if self.config.callbacks.modelcheckpoint: - print('Callbacks : Model Checkpoint') - if self.config.callbacks.earlystopping: - print(' : Early Stopping') - if self.config.callbacks.tensorboard: - print(' : Tensor Board') - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print(' : Reduce Learning Rate On Plateau') - if self.config.callbacks.earlystopping: - print('Patiance of ES : ' + str(self.config.callbacks.es_patience)) - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print('Patiance of RLRP : ' + str(self.config.callbacks.reduceLR_patience)) - print('\n---------------------------------------------------\n') - - print('Training is now begining.') - - start = time.time() - history = self.model.fit_generator( - self.data, - epochs=self.config.trainer.num_epochs, - verbose=self.config.trainer.verbose, - callbacks=self.callbacks, - validation_data=( - self.x_test, - self.y_test - ), - max_queue_size=15, - workers=10, - use_multiprocessing=True, - shuffle=self.config.trainer.shuffle, - ) - elapsed_time = time.time() - start - - else: - self.x_train, self.x_test, self.y_train, self.y_test = \ - self.data.test_train_split() - - print('\n-----------------Training Condition----------------\n') - if self.config.GPU.multi_gpu: - print('This model will be trained using ' + str(self.config.GPU.gpu_count) + ' GPUs.') - print('Number of epochs : ' + str(self.config.trainer.num_epochs)) - if type(self.x_train) is not list: - print('X training data : ', self.x_train.shape) - if type(self.y_train) is not list: - print('Y training data : ', self.y_train.shape) - if type(self.x_test) is not list: - print('X test data : ', self.x_test.shape) - if type(self.y_test) is not list: - print('Y test data : ', self.y_test.shape) - if self.config.callbacks.modelcheckpoint: - print('Callbacks : Model Checkpoint') - if self.config.callbacks.earlystopping: - print(' : Early Stopping') - if self.config.callbacks.tensorboard: - print(' : Tensor Board') - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print(' : Reduce Learning Rate On Plateau') - if self.config.callbacks.earlystopping: - print('Patiance of ES : ' + str(self.config.callbacks.es_patience)) - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print('Patiance of RLRP : ' + str(self.config.callbacks.reduceLR_patience)) - print('\n---------------------------------------------------\n') - - print('Training is now begining.') - - start = time.time() - history = self.model.fit( - self.x_train, - self.y_train, - epochs=self.config.trainer.num_epochs, - batch_size=self.config.trainer.batch_size, - shuffle=self.config.trainer.shuffle, - validation_data=( - self.x_test, - self.y_test - ), - callbacks=self.callbacks, - verbose=self.config.trainer.verbose - ) - elapsed_time = time.time() - start - self.val_loss_time['time'].append(elapsed_time) - self.val_loss_time['val_loss'].append( - min(history.history['val_loss']) - ) - df_results = pd.DataFrame(history.history) - df_results['epoch'] = history.epoch - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'History/', - exist_ok=True - ) - if self.config.save.history_save: - df_results.to_csv( - path_or_buf=self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'History/' + - self.config.callbacks.model_name + - '.csv', - index=False - ) - print('History was saved.') - - print("elapsed_time:{0}".format(elapsed_time) + "[sec]") - - K.clear_session() - print('The session was cleared.') - - df = pd.DataFrame(self.val_loss_time) - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'val_loss_time/', - exist_ok=True - ) - if self.config.save.val_time_save: - df.to_csv( - path_or_buf=self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'val_loss_time/' + - self.config.callbacks.model_name + - '.csv', - index=None - ) - print('Validation loss & time were saved.') - -class trainer_with_CV(): - def __init__(self, model, data, config): - self.model_maker = model - self.data = data - self.config = config - self.model = None - self.val_loss_time = { - 'val_loss': [], - 'time': [] - } - self.model_number = \ - ['Model_' + str(i + 1) for i in range(self.config.trainer.n_splits)] - - def make_callbacks(self): - self.callbacks = [] - if self.config.callbacks.modelcheckpoint and \ - not self.config.GPU.multi_gpu: - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/' + - self.config.callbacks.model_name + - '/', - exist_ok=True - ) - self.callbacks.append( - ModelCheckpoint( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/' + - self.config.callbacks.model_name + - '/' + - self.model_number[self.i] + - '.hdf5', - monitor=self.config.callbacks.cp_monitor, - save_best_only=self.config.callbacks.cp_save_best_only, - verbose=self.config.callbacks.cp_verbose - ) - ) - if self.config.callbacks.modelcheckpoint and \ - self.config.GPU.multi_gpu: - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/' + - self.config.callbacks.model_name + - '/', - exist_ok=True - ) - self.callbacks.append( - MultiGPUCheckpointCallback( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'Model/' + - self.config.callbacks.model_name + - '/' + - self.model_number[self.i] + - '.hdf5', - self.base_model, - monitor=self.config.callbacks.cp_monitor, - save_best_only=self.config.callbacks.cp_save_best_only, - verbose=self.config.callbacks.cp_verbose - ) - ) - - if self.config.callbacks.earlystopping: - self.callbacks.append( - EarlyStopping( - monitor=self.config.callbacks.es_monitor, - patience=self.config.callbacks.es_patience, - verbose=self.config.callbacks.es_verbose - ) - ) - - if self.config.callbacks.tensorboard: - self.callbacks.append( - TensorBoard( - log_dir=self.config.callbacks.tensorboard_log_dir, - write_graph=self.config.callbacks.tensorboard_write_graph, - ) - ) - - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - self.callbacks.append( - ReduceLROnPlateau( - monitor=self.config.callbacks.reduceLR_monitor, - factor=self.config.callbacks.reduceLR_factor, - patience=self.config.callbacks.reduceLR_patience, - verbose=self.config.callbacks.reduceLR_verbose, - ) - ) - - def train(self): - print('Training is now begining.') - print('The model will be trained using cross validation') - print('The number of total fold is ' + - str(self.config.trainer.n_splits)) - - kf = KFold(n_splits=self.config.trainer.n_splits, random_state=None, shuffle=True) - for self.i, (train_index, test_index) in enumerate(kf.split(self.data.X)): - if self.config.data_loader.generator: - self.x_test, self.y_test = \ - self.data.make_val_data() - - print('\n-----------------Training Condition----------------\n') - if self.config.GPU.multi_gpu: - print('This model will be trained using ' + str(self.config.GPU.gpu_count) + ' GPUs.') - print('This model will be trained by fit_generator.') - print('Number of epochs : ' + str(self.config.trainer.num_epochs)) - if self.config.model.name != 'LSTM' and not self.config.data_loader.with_shape: - print('X test data : ', self.x_test.shape) - print('Y test data : ', self.y_test.shape) - if self.config.callbacks.modelcheckpoint: - print('Callbacks : Model Checkpoint') - if self.config.callbacks.earlystopping: - print(' : Early Stopping') - if self.config.callbacks.tensorboard: - print(' : Tensor Board') - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print(' : Reduce Learning Rate On Plateau') - if self.config.callbacks.earlystopping: - print('Patiance of ES : ' + str(self.config.callbacks.es_patience)) - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print('Patiance of RLRP : ' + str(self.config.callbacks.reduceLR_patience)) - print('\nThe nomber of fold : %d' % (self.i + 1)) - print('\n---------------------------------------------------\n') - - print('Training is now begining.') - - else: - if self.config.model.name == 'CNN-AE': - self.x_train, self.x_test = \ - self.data.X[train_index], self.data.X[test_index] - self.y_train, self.y_test = \ - self.data.X[train_index, :, :, :self.config.data_loader.phys_num], \ - self.data.X[test_index, :, :, :self.config.data_loader.phys_num] - else: - if self.config.data_loader.with_shape: - self.x_train, self.x_test = \ - [self.data.X_CNN[train_index], self.data.X[train_index]], \ - [self.data.X_CNN[test_index], self.data.X[test_index]] - self.y_train, self.y_test = \ - self.data.Y[train_index], self.data.Y[test_index] - else: - self.x_train, self.x_test = \ - self.data.X[train_index], self.data.X[test_index] - self.y_train, self.y_test = \ - self.data.Y[train_index], self.data.Y[test_index] - - print('\n-----------------Training Condition----------------\n') - if self.config.GPU.multi_gpu: - print('This model will be trained using ' + str(self.config.GPU.gpu_count) + ' GPUs.') - print('Number of epochs : ' + str(self.config.trainer.num_epochs)) - if self.config.model.name != 'LSTM' and not self.config.data_loader.with_shape: - print('X training data : ', self.x_train.shape) - print('Y training data : ', self.y_train.shape) - print('X test data : ', self.x_test.shape) - print('Y test data : ', self.y_test.shape) - if self.config.callbacks.modelcheckpoint: - print('Callbacks : Model Checkpoint') - if self.config.callbacks.earlystopping: - print(' : Early Stopping') - if self.config.callbacks.tensorboard: - print(' : Tensor Board') - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print(' : Reduce Learning Rate On Plateau') - if self.config.callbacks.earlystopping: - print('Patiance of ES : ' + str(self.config.callbacks.es_patience)) - if self.config.model.optimizer == 'SGD' and \ - self.config.callbacks.reduceLR: - print('Patiance of RLRP : ' + str(self.config.callbacks.reduceLR_patience)) - print('\nThe nomber of fold : %d' % (self.i + 1)) - print('\n---------------------------------------------------\n') - - if self.model is not None: - del self.model - self.model, self.base_model = self.model_maker.make_model() - - self.make_callbacks() - - if self.config.data_loader.generator: - start = time.time() - history = self.model.fit_generator( - self.data, - epochs=self.config.trainer.num_epochs, - verbose=self.config.trainer.verbose, - callbacks=self.callbacks, - validation_data=( - self.x_test, - self.y_test - ), - max_queue_size=20, - workers=20, - use_multiprocessing=True, - shuffle=self.config.trainer.shuffle, - ) - elapsed_time = time.time() - start - - else: - start = time.time() - history = self.model.fit( - self.x_train, - self.y_train, - epochs=self.config.trainer.num_epochs, - batch_size=self.config.trainer.batch_size, - shuffle=self.config.trainer.shuffle, - validation_data=( - self.x_test, - self.y_test - ), - callbacks=self.callbacks, - verbose=self.config.trainer.verbose - ) - elapsed_time = time.time() - start - self.val_loss_time['time'].append(elapsed_time) - self.val_loss_time['val_loss'].append( - min(history.history['val_loss']) - ) - df_results = pd.DataFrame(history.history) - df_results['epoch'] = history.epoch - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'History/' + - self.config.callbacks.model_name + - '/', - exist_ok=True - ) - if self.config.save.history_save: - df_results.to_csv( - path_or_buf=self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'History/' + - self.config.callbacks.model_name + - '/' + - self.model_number[self.i] + - '.csv', - index=False - ) - print('History was saved.') - - print("elapsed_time:{0}".format(elapsed_time) + "[sec]") - - K.clear_session() - print('The session was cleared.') - - df = pd.DataFrame(self.val_loss_time, index=self.model_number) - os.makedirs( - self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'val_loss_time/', - exist_ok=True - ) - if self.config.save.val_time_save: - df.to_csv( - path_or_buf=self.config.data_loader.path_to_present_dir + - self.config.callbacks.save_file + - 'val_loss_time/' + - self.config.callbacks.model_name + - '.csv', - ) - print('Validation loss & time were saved.') diff --git a/Make_models/utils/__pycache__/config.cpython-36.pyc b/Make_models/utils/__pycache__/config.cpython-36.pyc deleted file mode 100644 index c7cdc02..0000000 Binary files a/Make_models/utils/__pycache__/config.cpython-36.pyc and /dev/null differ diff --git a/Make_models/utils/__pycache__/utils.cpython-36.pyc b/Make_models/utils/__pycache__/utils.cpython-36.pyc deleted file mode 100644 index d54717c..0000000 Binary files a/Make_models/utils/__pycache__/utils.cpython-36.pyc and /dev/null differ