This commit is contained in:
iperov 2019-01-10 23:01:33 +04:00
parent 127cc3303a
commit e39d1a2619
2 changed files with 4 additions and 4 deletions

View file

@ -64,7 +64,7 @@ class ModelBase(object):
force_best_gpu_idx = input_int("Which GPU idx to choose? ( skip: system choice ) : ", -1)
if self.epoch == 0 or ask_override:
default_write_preview_history = False if self.epoch == 0 else self.options['batch_size']
default_write_preview_history = False if self.epoch == 0 else self.options.get('write_preview_history',False)
self.options['write_preview_history'] = input_bool("Write preview history? (y/n ?:help skip:n/default) : ", default_write_preview_history, help_message="Preview history will be writed to <ModelName>_history folder.")
else:
self.options['write_preview_history'] = self.options.get('write_preview_history', False)
@ -75,7 +75,7 @@ class ModelBase(object):
self.options['target_epoch'] = self.options.get('target_epoch', 0)
if self.epoch == 0 or ask_override:
default_batch_size = 0 if self.epoch == 0 else self.options['batch_size']
default_batch_size = 0 if self.epoch == 0 else self.options.get('batch_size',0)
self.options['batch_size'] = max(0, input_int("Batch_size (?:help skip:0/default) : ", default_batch_size, help_message="Larger batch size is always better for NN's generalization, but it can cause Out of Memory error. Tune this value for your videocard manually."))
else:
self.options['batch_size'] = self.options.get('batch_size', 0)

View file

@ -36,13 +36,13 @@ class SAEModel(ModelBase):
self.options['lighter_encoder'] = self.options.get('lighter_encoder', False)
if is_first_run or ask_override:
default_style_power = 100 if is_first_run else self.options['face_style_power']
default_style_power = 100 if is_first_run else self.options.get('face_style_power', 100)
self.options['face_style_power'] = np.clip ( input_int("Face style power (0..100 ?:help skip:%d) : " % (default_style_power), default_style_power, help_message="How fast NN will learn dst face style during generalization of src and dst faces."), 0, 100 )
else:
self.options['face_style_power'] = self.options.get('face_style_power', 100)
if is_first_run or ask_override:
default_style_power = 100 if is_first_run else self.options['bg_style_power']
default_style_power = 100 if is_first_run else self.options.get('bg_style_power', 100)
self.options['bg_style_power'] = np.clip ( input_int("Background style power (0..100 ?:help skip:%d) : " % (default_style_power), default_style_power, help_message="How fast NN will learn dst background style during generalization of src and dst faces."), 0, 100 )
else:
self.options['bg_style_power'] = self.options.get('bg_style_power', 100)