DeepFaceLab icon indicating copy to clipboard operation
DeepFaceLab copied to clipboard

Suggestion for averaging/smoothing loss curve

Open kcimit opened this issue 6 years ago • 1 comments

Trainer.py:

`def running_mean(x, N): cumsum = np.cumsum(np.insert(x, 0, 0)) return (cumsum[N:] - cumsum[:-N]) / float(N)

def main(args, device_args): ... if show_last_history_iters_count <= 10000: moving_aves = np.array(loss_history_to_show) N=400 lh1 = running_mean(moving_aves[:,0], N) lh2 = running_mean(moving_aves[:,1], N) res_lh = np.column_stack((lh1, lh2)) lh_img = models.ModelBase.get_loss_history_preview(res_lh, iter, w, c)

                else:
                   lh_img = models.ModelBase.get_loss_history_preview(loss_history_to_show, iter, w, c)`

Result: image

kcimit avatar Jan 28 '20 07:01 kcimit

no thx. I need to view total max and min value

iperov avatar Jan 28 '20 08:01 iperov