question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confusing setting of validation frequency

See original GitHub issue

🚀 Feature

Currently the validation frequency is set by check_val_every_n_epoch and val_check_interval of Trainer. The former one and latter one have an overlap in terms of frequency control actually. I propose use check_val_every_n_epoch and check_val_every_n_batches as the parameter:

check_val_every_n_epoch=10 is equivalent to check_val_every_n_epoch=10 previously check_val_every_n_epoch=0.1 is equivalent to val_check_interval=0.1 previously check_val_every_n_batches=10 is equivalent to val_check_interval=10.

And furthermore, these two options should be mutually exclusive. If one sets check_val_every_n_batches then shouldn’t set check_val_every_n_batches.

Motivation

I propose this because I get confused when I try to tweak the validation frequency and find two options for setting it…

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
qiuhuaqicommented, Jul 29, 2020

Why not merge the two flags together? e.g. keep only val_check_interval, use int to specify the number of batches, use float to specify in terms of epochs but allows >1.0

val_check_interval=3.0 => validation every 3 epochs, val_check_interval=10 => validation every 10 batches within an epoch in the unlikely usecase of val_check_interval=3.5 => validation every 3.5 epochs, (triggering validation_epoch_end at the end of epoch 4?)

This would also solve the mutual exclusiveness issue. Or would this complicate things too much?

0reactions
turiancommented, Aug 26, 2021

I am also interested in this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Confusing setting of validation frequency · Issue #1189 - GitHub
Feature Currently the validation frequency is set by check_val_every_n_epoch and val_check_interval of Trainer. The former one and latter ...
Read more >
Validation in deep learning networks - Cross Validated
Why the validation frequency is higher than the number of iterations per epoch? I think the network should be validated at least once...
Read more >
Confusion matrix on the validation set. The samples on the ...
We also experimented with the device operating in real-time with a sampling frequency from 100 Hz to 2133 Hz and a 24-bit resolution....
Read more >
Training and Validation Measures of Fit - JMP
The Confusion Rates report is equal to the Confusion Matrix report, with the numbers divided by the row totals. Want more information? Have ......
Read more >
Evaluating Model Performance Using Validation Dataset and ...
In this article, we discuss evaluating the performance of Machine Learning models in the context of validation techniques: what it is, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found