Commit 48dbf99e authored by AngelBottomless's avatar AngelBottomless Committed by AUTOMATIC1111
Browse files

Allow tracking real-time loss

Someone had 6000 images in their dataset, and it was shown as 0, which was confusing.
This will allow tracking real time dataset-average loss for registered objects.
parent ca5a9e79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -360,7 +360,7 @@ def train_hypernetwork(hypernetwork_name, learn_rate, batch_size, data_root, log
    pbar = tqdm.tqdm(enumerate(ds), total=steps - ititial_step)
    for i, entries in pbar:
        hypernetwork.step = i + ititial_step
        if loss_dict and i % size == 0:
        if len(loss_dict) > 0:
            previous_mean_loss = sum(i[-1] for i in loss_dict.values()) / len(loss_dict)
            
        scheduler.apply(optimizer, hypernetwork.step)