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
a6797285
"docs/git@developer.sourcefind.cn:change/sglang.git" did not exist on "cf5d27e30a7c2f74842347e994145f0ee2e9bbc1"
Commit
a6797285
authored
Jul 29, 2020
by
Kaushik Shivakumar
Browse files
fix
parent
3564e7ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
research/object_detection/model_lib_v2.py
research/object_detection/model_lib_v2.py
+3
-3
No files found.
research/object_detection/model_lib_v2.py
View file @
a6797285
...
@@ -341,7 +341,7 @@ def load_fine_tune_checkpoint(
...
@@ -341,7 +341,7 @@ def load_fine_tune_checkpoint(
features
,
labels
=
iter
(
input_dataset
).
next
()
features
,
labels
=
iter
(
input_dataset
).
next
()
@
tf
.
function
#
@tf.function
def
_dummy_computation_fn
(
features
,
labels
):
def
_dummy_computation_fn
(
features
,
labels
):
model
.
_is_training
=
False
# pylint: disable=protected-access
model
.
_is_training
=
False
# pylint: disable=protected-access
tf
.
keras
.
backend
.
set_learning_phase
(
False
)
tf
.
keras
.
backend
.
set_learning_phase
(
False
)
...
@@ -604,7 +604,7 @@ def train_loop(
...
@@ -604,7 +604,7 @@ def train_loop(
return
strategy
.
reduce
(
tf
.
distribute
.
ReduceOp
.
SUM
,
return
strategy
.
reduce
(
tf
.
distribute
.
ReduceOp
.
SUM
,
per_replica_losses
,
axis
=
None
)
per_replica_losses
,
axis
=
None
)
#
@tf.function
@
tf
.
function
def
_dist_train_step
(
data_iterator
):
def
_dist_train_step
(
data_iterator
):
"""A distributed train step."""
"""A distributed train step."""
...
@@ -716,7 +716,7 @@ def eager_eval_loop(
...
@@ -716,7 +716,7 @@ def eager_eval_loop(
evaluators
=
None
evaluators
=
None
loss_metrics
=
{}
loss_metrics
=
{}
@
tf
.
function
#
@tf.function
def
compute_eval_dict
(
features
,
labels
):
def
compute_eval_dict
(
features
,
labels
):
"""Compute the evaluation result on an image."""
"""Compute the evaluation result on an image."""
# For evaling on train data, it is necessary to check whether groundtruth
# For evaling on train data, it is necessary to check whether groundtruth
...
...
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