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
ModelZoo
ResNet50_tensorflow
Commits
c1da1ae5
Commit
c1da1ae5
authored
Jul 18, 2018
by
Jacob Buckman
Browse files
Fixed minor bug in STEVE which sometimes prevented resuming experiments.
parent
f789dcf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
research/steve/learner.py
research/steve/learner.py
+4
-3
No files found.
research/steve/learner.py
View file @
c1da1ae5
...
@@ -155,9 +155,10 @@ class Learner(object):
...
@@ -155,9 +155,10 @@ class Learner(object):
self
.
resume_from_checkpoint
(
epoch
)
self
.
resume_from_checkpoint
(
epoch
)
def
_log
(
self
):
def
_log
(
self
):
logstring
=
"(%3.2f sec) h%-8.2f e%-8d s%-8d f%-8d
\t
"
%
(
time
.
time
()
-
self
.
_log_time
,
self
.
hours
,
self
.
epoch
,
self
.
update_i
+
1
,
self
.
total_frames
)
+
', '
.
join
([
"%8f"
%
x
for
x
in
(
self
.
running_total
/
self
.
denom
).
tolist
()])
if
self
.
denom
>
0
:
print
(
"%s
\t
%s"
%
(
self
.
learner_name
,
logstring
))
logstring
=
"(%3.2f sec) h%-8.2f e%-8d s%-8d f%-8d
\t
"
%
(
time
.
time
()
-
self
.
_log_time
,
self
.
hours
,
self
.
epoch
,
self
.
update_i
+
1
,
self
.
total_frames
)
+
', '
.
join
([
"%8f"
%
x
for
x
in
(
self
.
running_total
/
self
.
denom
).
tolist
()])
with
open
(
self
.
log_path
,
"a"
)
as
f
:
f
.
write
(
logstring
+
"
\n
"
)
print
(
"%s
\t
%s"
%
(
self
.
learner_name
,
logstring
))
with
open
(
self
.
log_path
,
"a"
)
as
f
:
f
.
write
(
logstring
+
"
\n
"
)
self
.
_reset_inspections
()
self
.
_reset_inspections
()
def
_reset_inspections
(
self
):
def
_reset_inspections
(
self
):
...
...
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