[Fix] Fix bug in tools/analyse_logs.py
caused by wrong plot_iter in some cases.
#1428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Fix #1426
Current in
tools/analyse_logs.py
we assert whether certain line inlog.json
is validation rather than training set by:It's OK in many cases like below
32000 (pre_iter) > 250 (epoch_logs['iter'][idx])
.It is in ConvNeXt, whose validation step is 16000. Of course, 16000, 32000, 48000 and so on those values > 250.
Note that 250 is related with number of images in validation sets.
However, in certain cases when (1) valitaion is large and (2) validation step is small, like below:
The valition has 1334 images and validation step is 200. So
200 (pre_iter) < 1334 (epoch_logs['iter'][idx])
. And it would generate many1334
inplot_iters
which makes a horizontal line segment in lr figure:Solution
Using paragraph below to assert whther to keep values in training set.
Result
Take logfile.zip from #1426 for example:
LR before:
LR after:
Loss before:
Loss after: