Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
instant-ngp-tomography
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Pickles
instant-ngp-tomography
Commits
7fcbd01d
Commit
7fcbd01d
authored
3 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Reduce (surprisingly significant) training progress printing overhead
parent
6ee845f7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/run.py
+7
-3
7 additions, 3 deletions
scripts/run.py
with
7 additions
and
3 deletions
scripts/run.py
+
7
−
3
View file @
7fcbd01d
...
@@ -176,6 +176,7 @@ if __name__ == "__main__":
...
@@ -176,6 +176,7 @@ if __name__ == "__main__":
if
n_steps
<
0
:
if
n_steps
<
0
:
n_steps
=
100000
n_steps
=
100000
tqdm_last_update
=
0
if
n_steps
>
0
:
if
n_steps
>
0
:
with
tqdm
(
desc
=
"
Training
"
,
total
=
n_steps
,
unit
=
"
step
"
)
as
t
:
with
tqdm
(
desc
=
"
Training
"
,
total
=
n_steps
,
unit
=
"
step
"
)
as
t
:
while
testbed
.
frame
():
while
testbed
.
frame
():
...
@@ -193,9 +194,12 @@ if __name__ == "__main__":
...
@@ -193,9 +194,12 @@ if __name__ == "__main__":
old_training_step
=
0
old_training_step
=
0
t
.
reset
()
t
.
reset
()
t
.
update
(
testbed
.
training_step
-
old_training_step
)
now
=
time
.
monotonic
()
t
.
set_postfix
(
loss
=
testbed
.
loss
)
if
now
-
tqdm_last_update
>
0.1
:
old_training_step
=
testbed
.
training_step
t
.
update
(
testbed
.
training_step
-
old_training_step
)
t
.
set_postfix
(
loss
=
testbed
.
loss
)
old_training_step
=
testbed
.
training_step
tqdm_last_update
=
now
if
args
.
save_snapshot
:
if
args
.
save_snapshot
:
print
(
"
Saving snapshot
"
,
args
.
save_snapshot
)
print
(
"
Saving snapshot
"
,
args
.
save_snapshot
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment