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
a964b89a
Commit
a964b89a
authored
Jun 22, 2021
by
Yeqing Li
Committed by
A. Unique TensorFlower
Jun 22, 2021
Browse files
Internal change
PiperOrigin-RevId: 380858205
parent
662127aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
official/core/train_lib.py
official/core/train_lib.py
+5
-2
No files found.
official/core/train_lib.py
View file @
a964b89a
...
...
@@ -40,7 +40,8 @@ def run_experiment(
model_dir
:
str
,
run_post_eval
:
bool
=
False
,
save_summary
:
bool
=
True
,
trainer
:
Optional
[
base_trainer
.
Trainer
]
=
None
trainer
:
Optional
[
base_trainer
.
Trainer
]
=
None
,
controller_cls
=
orbit
.
Controller
)
->
Tuple
[
tf
.
keras
.
Model
,
Mapping
[
str
,
Any
]]:
"""Runs train/eval configured by the experiment params.
...
...
@@ -56,6 +57,8 @@ def run_experiment(
save_summary: Whether to save train and validation summary.
trainer: the base_trainer.Trainer instance. It should be created within the
strategy.scope().
controller_cls: The controller class to manage the train and eval process.
Must be a orbit.Controller subclass.
Returns:
A 2-tuple of (model, eval_logs).
...
...
@@ -87,7 +90,7 @@ def run_experiment(
else
:
checkpoint_manager
=
None
controller
=
orbit
.
C
ontroller
(
controller
=
c
ontroller
_cls
(
strategy
=
distribution_strategy
,
trainer
=
trainer
if
'train'
in
mode
else
None
,
evaluator
=
trainer
,
...
...
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