"git@developer.sourcefind.cn:Wenxuan/LightX2V.git" did not exist on "165ec807290292736a4b6161bf693d2a88d70c09"
Commit 94833324 authored by Yeqing Li's avatar Yeqing Li Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 278756245
parent 02cc984e
...@@ -134,7 +134,10 @@ class RetinanetBenchmarkBase(DetectionBenchmarkBase): ...@@ -134,7 +134,10 @@ class RetinanetBenchmarkBase(DetectionBenchmarkBase):
def _run_detection_main(self): def _run_detection_main(self):
"""Starts detection job.""" """Starts detection job."""
if self.timer_callback:
return detection.run(callbacks=[self.timer_callback]) return detection.run(callbacks=[self.timer_callback])
else:
return detection.run()
class RetinanetAccuracy(RetinanetBenchmarkBase): class RetinanetAccuracy(RetinanetBenchmarkBase):
...@@ -180,6 +183,10 @@ class RetinanetAccuracy(RetinanetBenchmarkBase): ...@@ -180,6 +183,10 @@ class RetinanetAccuracy(RetinanetBenchmarkBase):
'iterations_per_loop': 100, 'iterations_per_loop': 100,
'total_steps': 22500, 'total_steps': 22500,
'train_file_pattern': self.train_data_path, 'train_file_pattern': self.train_data_path,
'checkpoint': {
'path': self.resnet_checkpoint_path,
'prefix': 'resnet50/'
},
}, },
'eval': { 'eval': {
'batch_size': 8, 'batch_size': 8,
......
...@@ -426,6 +426,7 @@ class DistributedExecutor(object): ...@@ -426,6 +426,7 @@ class DistributedExecutor(object):
if not custom_callbacks: if not custom_callbacks:
return return
for callback in custom_callbacks: for callback in custom_callbacks:
if callback:
callback.on_batch_begin(batch) callback.on_batch_begin(batch)
def _run_callbacks_on_batch_end(batch): def _run_callbacks_on_batch_end(batch):
...@@ -433,6 +434,7 @@ class DistributedExecutor(object): ...@@ -433,6 +434,7 @@ class DistributedExecutor(object):
if not custom_callbacks: if not custom_callbacks:
return return
for callback in custom_callbacks: for callback in custom_callbacks:
if callback:
callback.on_batch_end(batch) callback.on_batch_end(batch)
if save_config: if save_config:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment