lllyasviel / lllyasviel/ControlNet

Validation Loss

Open
#704 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

I have introduced the validation phase using a custom dataset:

```
val_dataloader = DataLoader(val_dataset, num_workers=0, batch_size=batch_size, shuffle=False)
# omit some codes
trainer.fit(model, train_dataloader, val_dataloader)
```

However, it seems the code does not present the loss:

```
Epoch 2: 95%|█████████▌| 120/126 [04:27<00:13, 2.23s/it, loss=0.00658, v_num=3, train/loss_simple_step=0.0176, train/loss_vlb_step=0.000127, train/loss_step=0.0176, global_step=263.0, train/loss_simple_epoch=0.00721, train/loss_vlb_epoch=0.000521, train/loss_epoch=0.00721]
Validating: 84%|████████▍ | 32/38 [00:36<00:06, 1.13s/it]
Epoch 2: 97%|█████████▋| 122/126 [04:29<00:08, 2.21s/it, loss=0.00658, v_num=3, train/loss_simple_step=0.0176, train/loss_vlb_step=0.000127, train/loss_step=0.0176, global_step=263.0, train/loss_simple_epoch=0.00721, train/loss_vlb_epoch=0.000521, train/loss_epoch=0.00721]
Validating: 89%|████████▉ | 34/38 [00:38<00:04, 1.13s/it]
Epoch 2: 98%|█████████▊| 124/126 [04:32<00:04, 2.20s/it, loss=0.00658, v_num=3, train/loss_simple_step=0.0176, train/loss_vlb_step=0.000127, train/loss_step=0.0176, global_step=263.0, train/loss_simple_epoch=0.00721, train/loss_vlb_epoch=0.000521, train/loss_epoch=0.00721]
Validating: 95%|█████████▍| 36/38 [00:40<00:02, 1.14s/it]
```

I would appreciate it if anyone could advise me on this, thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the validation path at trainer.fit(model, train_dataloader, val_dataloader) and compare it with the displayed training metrics. Trace how the custom val_dataloader's loss is logged; done means the validation loss appears in the validation output alongside the training losses.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.