Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation Loss #704

Open
NUS-Tim opened this issue Sep 12, 2024 · 1 comment
Open

Validation Loss #704

NUS-Tim opened this issue Sep 12, 2024 · 1 comment

Comments

@NUS-Tim
Copy link

NUS-Tim commented Sep 12, 2024

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!

@jiajiao272727
Copy link

jiajiao272727 commented Dec 3, 2024

May I ask will it store all loss data in "loss_log.txt" like pix2pix? I also followed the process of the formal tutorial "Train a ControlNet to Control", but only get the model of the newest epoch in the "lightning_logs" folder and sample images in the "image_log" folder. Thank you so much~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants