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
2d3c9afb
Commit
2d3c9afb
authored
May 27, 2021
by
Rebecca Chen
Committed by
A. Unique TensorFlower
May 27, 2021
Browse files
Internal change
PiperOrigin-RevId: 376239468
parent
ffc4d53e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
orbit/controller.py
orbit/controller.py
+1
-1
orbit/standard_runner.py
orbit/standard_runner.py
+7
-3
No files found.
orbit/controller.py
View file @
2d3c9afb
...
@@ -338,7 +338,7 @@ class Controller:
...
@@ -338,7 +338,7 @@ class Controller:
self
.
restore_checkpoint
(
checkpoint_path
)
self
.
restore_checkpoint
(
checkpoint_path
)
self
.
evaluate
(
steps
)
self
.
evaluate
(
steps
)
def
restore_checkpoint
(
self
,
checkpoint_path
:
str
=
None
):
def
restore_checkpoint
(
self
,
checkpoint_path
:
Optional
[
str
]
=
None
):
"""Restores the model from a checkpoint.
"""Restores the model from a checkpoint.
Args:
Args:
...
...
orbit/standard_runner.py
View file @
2d3c9afb
...
@@ -83,7 +83,9 @@ class StandardTrainer(runner.AbstractTrainer, metaclass=abc.ABCMeta):
...
@@ -83,7 +83,9 @@ class StandardTrainer(runner.AbstractTrainer, metaclass=abc.ABCMeta):
`tf.function`, as determined by the `options` passed to `__init__`.
`tf.function`, as determined by the `options` passed to `__init__`.
"""
"""
def
__init__
(
self
,
train_dataset
,
options
:
StandardTrainerOptions
=
None
):
def
__init__
(
self
,
train_dataset
,
options
:
Optional
[
StandardTrainerOptions
]
=
None
):
"""Initializes the `StandardTrainer` instance.
"""Initializes the `StandardTrainer` instance.
Args:
Args:
...
@@ -256,7 +258,9 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
...
@@ -256,7 +258,9 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
is recommended in this case.
is recommended in this case.
"""
"""
def
__init__
(
self
,
eval_dataset
,
options
:
StandardEvaluatorOptions
=
None
):
def
__init__
(
self
,
eval_dataset
,
options
:
Optional
[
StandardEvaluatorOptions
]
=
None
):
"""Initializes the `StandardEvaluator` instance.
"""Initializes the `StandardEvaluator` instance.
Args:
Args:
...
@@ -403,7 +407,7 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
...
@@ -403,7 +407,7 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
pass
pass
def
eval_reduce
(
self
,
def
eval_reduce
(
self
,
state
:
Any
=
None
,
state
:
Optional
[
Any
]
=
None
,
step_outputs
:
Optional
[
runner
.
Output
]
=
None
)
->
Any
:
step_outputs
:
Optional
[
runner
.
Output
]
=
None
)
->
Any
:
"""A function to perform per-step reduction on the evaluation outputs.
"""A function to perform per-step reduction on the evaluation outputs.
...
...
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