Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
810c44d8
Unverified
Commit
810c44d8
authored
Jul 13, 2021
by
Ziyi Wu
Committed by
GitHub
Jul 13, 2021
Browse files
[Fix] Fix potential bug in using `analyze_logs.py` (#720)
* fix bug when interval == 1 * minor fix
parent
6cd23071
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
tools/analysis_tools/analyze_logs.py
tools/analysis_tools/analyze_logs.py
+12
-4
No files found.
tools/analysis_tools/analyze_logs.py
View file @
810c44d8
...
...
@@ -53,10 +53,18 @@ def plot_curve(log_dicts, args):
f
'
{
args
.
json_logs
[
i
]
}
does not contain metric
{
metric
}
'
)
if
args
.
mode
==
'eval'
:
if
min
(
epochs
)
==
args
.
interval
:
x0
=
args
.
interval
else
:
# if current training is resumed from previous checkpoint
# we lost information in early epochs
# `xs` should start according to `min(epochs)`
x0
=
min
(
epochs
)
+
args
.
interval
-
min
(
epochs
)
%
args
.
interval
if
min
(
epochs
)
%
args
.
interval
==
0
:
x0
=
min
(
epochs
)
else
:
# find the first epoch that do eval
x0
=
min
(
epochs
)
+
args
.
interval
-
\
min
(
epochs
)
%
args
.
interval
xs
=
np
.
arange
(
x0
,
max
(
epochs
)
+
1
,
args
.
interval
)
ys
=
[]
for
epoch
in
epochs
[
args
.
interval
-
1
::
args
.
interval
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment