Skip to content

Commit

Permalink
comments possible options
Browse files Browse the repository at this point in the history
  • Loading branch information
JNaranjo-Alcazar committed Dec 4, 2020
1 parent 4002e18 commit c2a4181
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions code/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@
freq_bands = 64

# model parameters
verbose = True
verbose = True # [True, False]
n_filters = [32, 64, 128]
pools_size = [(1, 10), (1, 5), (1, 5)]
dropouts_rate = [0.3, 0.3, 0.3]

ratio = 2

reshape_method = 'global_avg'
reshape_method = 'global_avg' # ['global_avg', 'global_max', 'flatten']
dense_layer = None
dropouts_rate_cl = None

split_freqs = False
split_freqs = False # [True, False]
n_split_freqs = 3
f_split_freqs = [64, 128]

# callbacks
# Early Stopping
early_stopping = True
early_stopping = True # [True, False]
monitor_es = None
min_delta_es = None
mode_es = None
patience_es = None

# Get Learning Rate
get_lr_after_epoch = True
get_lr_after_epoch = True # [True, False]

# Reduce LR OnPlateau
lr_on_plateau = True
lr_on_plateau = True # [True, False]
monitor_lr_on_plateau = None
factor_lr_on_plateau = None
patience_lr_on_plateau = None
min_lr_on_plateau = None

# Save models and csvs
save_outputs = True
save_outputs = True # [True, False]
outputs_path = '/repos/DCASE2021-Task1/outputs/'
best_model_name = 'best.h5'
last_model_name = 'last.h5'
log_name = 'log.csv'

# training hyperparamteres
quick_test = True
loss_type = 'focal_loss'
quick_test = True # [True, False]
loss_type = 'focal_loss' # ['focal_loss', 'categorical_loss']
fl_alpha = 0.25 # needed if focal
fl_gamma = 2 # needed if focal
data_augmentation = 'mixup'
epochs = 500
mixup_alpha = 0.4
batch_size = 32
training_verbose = None
training_verbose = None # [None, 0, 1, 2]
2 changes: 1 addition & 1 deletion code/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import keras
from utils import create_folder_time, moving_config_file_to_folder


def check_reshape_variable(reshape_method):
possible_options = ['global_avg', 'global_max', 'flatten']

Expand Down Expand Up @@ -61,7 +62,6 @@ def is_boolean(inp):


def check_callbacks():

if (config.early_stopping is not True and config.get_lr_after_epoch is not True
and config.factor_lr_on_plateau and config.save_outputs is not True):
return None
Expand Down

0 comments on commit c2a4181

Please sign in to comment.