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
14797cf7
Commit
14797cf7
authored
Dec 27, 2017
by
Joseph Friedman
Browse files
updated eval for python 3
parent
fad60753
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/im2txt/im2txt/evaluate.py
research/im2txt/im2txt/evaluate.py
+2
-2
No files found.
research/im2txt/im2txt/evaluate.py
View file @
14797cf7
...
@@ -76,7 +76,7 @@ def evaluate_model(sess, model, global_step, summary_writer, summary_op):
...
@@ -76,7 +76,7 @@ def evaluate_model(sess, model, global_step, summary_writer, summary_op):
start_time
=
time
.
time
()
start_time
=
time
.
time
()
sum_losses
=
0.
sum_losses
=
0.
sum_weights
=
0.
sum_weights
=
0.
for
i
in
x
range
(
num_eval_batches
):
for
i
in
range
(
num_eval_batches
):
cross_entropy_losses
,
weights
=
sess
.
run
([
cross_entropy_losses
,
weights
=
sess
.
run
([
model
.
target_cross_entropy_losses
,
model
.
target_cross_entropy_losses
,
model
.
target_cross_entropy_loss_weights
model
.
target_cross_entropy_loss_weights
...
@@ -143,7 +143,7 @@ def run_once(model, saver, summary_writer, summary_op):
...
@@ -143,7 +143,7 @@ def run_once(model, saver, summary_writer, summary_op):
global_step
=
global_step
,
global_step
=
global_step
,
summary_writer
=
summary_writer
,
summary_writer
=
summary_writer
,
summary_op
=
summary_op
)
summary_op
=
summary_op
)
except
Exception
,
e
:
# pylint: disable=broad-except
except
Exception
as
e
:
# pylint: disable=broad-except
tf
.
logging
.
error
(
"Evaluation failed."
)
tf
.
logging
.
error
(
"Evaluation failed."
)
coord
.
request_stop
(
e
)
coord
.
request_stop
(
e
)
...
...
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