EPOCH_FINETUNING = 10 DICT_LR_FINETUNING = collections.OrderedDict() DICT_LR_FINETUNING['0'] = 1e-3 DICT_LR_FINETUNING['2'] = 3e-4 DICT_LR_FINETUNING['3'] = 1e-4 DICT_LR_FINETUNING['4'] = 3e-5 DICT_LR_FINETUNING['5'] = 1e-5 DICT_LR_FINETUNING['7'] = 3e-6 DICT_LR_FINETUNING['8'] = 1e-6 train_task_one_step(model1=model1, filename_csv_train=FILENAME_CSV_TRAIN, FILENAME_CSV_VALID=FILENAME_CSV_VALID, filename_csv_test=FILENAME_CSV_TEST, input_shape=IMAGE_SHAPE, imgaug_train_seq=IMGAUG_TRAIN_SEQ, add_top=False, change_top=True, optimizer=OPTIMIZER, lookahead=LOOKAHEAD, batch_size_train=BATCH_SIZE_TRAIN, batch_size_valid=BATCH_SIZE_TRAIN, epoch_finetuning=EPOCH_FINETUNING, dict_lr_finetuning=DICT_LR_FINETUNING, class_weight=CLASS_WEIGHT, label_smoothing=LABEL_SMOOTHING, weight_class_start=WEIGHT_CLASS_START, weight_class_end=WEIGHT_CLASS_END, balance_ratio=BALANCE_RATIO, model_save_dir=model_save_dir1, model_name=MODEL_NAME, verbose=2, gpu_num=GPU_NUM, config_file_realtime='config_file_realtime.json') #endregion print('OK!')
train_task_one_step( model_file=MODEL_FILE, pre_define_model=PRE_DEFINE_MODEL, filename_csv_train=FILENAME_CSV_TRAIN, filename_csv_valid=FILENAME_CSV_VALID, filename_csv_test=FILENAME_CSV_TEST, add_top=ADD_TOP, change_top=CHANGE_TOP, input_shape=IMAGE_SHAPE, imgaug_train_seq=IMGAUG_TRAIN_SEQ, optimizer='adam', lookahead=False, batch_size_train=BATCH_SIZE_TRAIN, batch_size_valid=BATCH_SIZE_TRAIN, epoch=EPOCH_FINETUNING, dict_lr=DICT_LR_FINETUNING, class_weight=CLASS_WEIGHT, label_smoothing=LABEL_SMOOTHING, weight_class_start=WEIGHT_CLASS_START, weight_class_end=WEIGHT_CLASS_END, balance_ratio=BALANCE_RATIO, # specificity=0.9, sensitivity=0.9, verbose=VERBOSE, model_save_dir=MODEL_SAVE_DIR, model_name=MODEL_NAME, config_file_realtime='config_file_realtime.json', use_multiprocessing=USE_MULTIPROCESSING, workers=WORKER, plt_history_image_file=PLT_HISTORY_IMAGE_FILE)