diff --git a/mainscripts/Trainer.py b/mainscripts/Trainer.py index 839f374..ce9c1df 100644 --- a/mainscripts/Trainer.py +++ b/mainscripts/Trainer.py @@ -28,6 +28,7 @@ def trainerThread (s2c, c2s, e, args, device_args): save_interval_min = 15 debug = args.get('debug', '') execute_programs = args.get('execute_programs', []) + no_preview = args.get('no_preview', False) if not training_data_src_path.exists(): io.log_err('Training data src directory does not exist.') @@ -47,6 +48,7 @@ def trainerThread (s2c, c2s, e, args, device_args): pretraining_data_path=pretraining_data_path, is_training=True, debug=debug, + no_preview=no_preview, device_args=device_args) is_reached_goal = model.is_reached_iter_goal() diff --git a/models/ModelBase.py b/models/ModelBase.py index c714e81..c7027d1 100644 --- a/models/ModelBase.py +++ b/models/ModelBase.py @@ -23,7 +23,7 @@ You can implement your own model. Check examples. class ModelBase(object): - def __init__(self, model_path, training_data_src_path=None, training_data_dst_path=None, pretraining_data_path=None, is_training=False, debug = False, device_args = None, + def __init__(self, model_path, training_data_src_path=None, training_data_dst_path=None, pretraining_data_path=None, is_training=False, debug = False, no_preview=False, device_args = None, ask_enable_autobackup=True, ask_write_preview_history=True, ask_target_iter=True, @@ -55,6 +55,7 @@ class ModelBase(object): self.pretraining_data_path = pretraining_data_path self.debug = debug + self.no_preview = no_preview self.is_training_mode = is_training self.iter = 0