diff --git a/mainscripts/Trainer.py b/mainscripts/Trainer.py index fd55f84..507bc9c 100644 --- a/mainscripts/Trainer.py +++ b/mainscripts/Trainer.py @@ -308,9 +308,7 @@ def create_preview_pane_image(previews, selected_preview, loss_history, else: loss_history_to_show = loss_history[-show_last_history_iters_count:] lh_height = int(100 * zoom.scale) - # FIXME: investigate old behavior (batch_size, lh_height) - # lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iteration, batch_size, w, c, lh_height) - lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iteration, w, c) + lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iteration, w, c, lh_height) final = np.concatenate([final, lh_img], axis=0) final = np.concatenate([final, selected_preview_rgb], axis=0) diff --git a/models/ModelBase.py b/models/ModelBase.py index 3cb88c5..29ca6b8 100644 --- a/models/ModelBase.py +++ b/models/ModelBase.py @@ -535,7 +535,7 @@ class ModelBase(object): def get_summary_text(self): visible_options = self.options.copy() visible_options.update(self.options_show_override) - + ###Generate text summary of model hyperparameters #Find the longest key name and value string. Used as column widths. width_name = max([len(k) for k in visible_options.keys()] + [17]) + 1 # Single space buffer to left edge. Minimum of 17, the length of the longest static string used "Current iteration" @@ -574,10 +574,9 @@ class ModelBase(object): return summary_text @staticmethod - def get_loss_history_preview(loss_history, iter, w, c): + def get_loss_history_preview(loss_history, iter, w, c, lh_height=100): loss_history = np.array (loss_history.copy()) - lh_height = 100 lh_img = np.ones ( (lh_height,w,c) ) * 0.1 if len(loss_history) != 0: