diff options
| author | AngelBottomless <35677394+aria1th@users.noreply.github.com> | 2022-10-23 04:17:16 +0900 |
|---|---|---|
| committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-22 22:24:19 +0300 |
| commit | 48dbf99e84045ee7af55bc5b1b86492a240e631e (patch) | |
| tree | 2f5af9a2d3b864dddbbd62a4fd441a0a9f9aecc5 /modules/hypernetworks | |
| parent | ca5a9e79dc28eeaa3a161427a82e34703bf15765 (diff) | |
| download | stable-diffusion-webui-gfx803-48dbf99e84045ee7af55bc5b1b86492a240e631e.tar.gz | |
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.
Diffstat (limited to 'modules/hypernetworks')
| -rw-r--r-- | modules/hypernetworks/hypernetwork.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index 81132be4..99fd0f8f 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -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)
|
