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
94833324
Commit
94833324
authored
Nov 05, 2019
by
Yeqing Li
Committed by
A. Unique TensorFlower
Nov 05, 2019
Browse files
Internal change
PiperOrigin-RevId: 278756245
parent
02cc984e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
official/benchmark/retinanet_benchmark.py
official/benchmark/retinanet_benchmark.py
+8
-1
official/modeling/training/distributed_executor.py
official/modeling/training/distributed_executor.py
+4
-2
No files found.
official/benchmark/retinanet_benchmark.py
View file @
94833324
...
...
@@ -134,7 +134,10 @@ class RetinanetBenchmarkBase(DetectionBenchmarkBase):
def
_run_detection_main
(
self
):
"""Starts detection job."""
return
detection
.
run
(
callbacks
=
[
self
.
timer_callback
])
if
self
.
timer_callback
:
return
detection
.
run
(
callbacks
=
[
self
.
timer_callback
])
else
:
return
detection
.
run
()
class
RetinanetAccuracy
(
RetinanetBenchmarkBase
):
...
...
@@ -180,6 +183,10 @@ class RetinanetAccuracy(RetinanetBenchmarkBase):
'iterations_per_loop'
:
100
,
'total_steps'
:
22500
,
'train_file_pattern'
:
self
.
train_data_path
,
'checkpoint'
:
{
'path'
:
self
.
resnet_checkpoint_path
,
'prefix'
:
'resnet50/'
},
},
'eval'
:
{
'batch_size'
:
8
,
...
...
official/modeling/training/distributed_executor.py
View file @
94833324
...
...
@@ -426,14 +426,16 @@ class DistributedExecutor(object):
if
not
custom_callbacks
:
return
for
callback
in
custom_callbacks
:
callback
.
on_batch_begin
(
batch
)
if
callback
:
callback
.
on_batch_begin
(
batch
)
def
_run_callbacks_on_batch_end
(
batch
):
"""Runs custom callbacks at the end of every step."""
if
not
custom_callbacks
:
return
for
callback
in
custom_callbacks
:
callback
.
on_batch_end
(
batch
)
if
callback
:
callback
.
on_batch_end
(
batch
)
if
save_config
:
self
.
_save_config
(
model_dir
)
...
...
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