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
58a0c81c
Commit
58a0c81c
authored
Jul 23, 2020
by
Ruoxin Sang
Committed by
A. Unique TensorFlower
Jul 23, 2020
Browse files
Internal change
PiperOrigin-RevId: 322937598
parent
ce93cb75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
orbit/standard_runner.py
orbit/standard_runner.py
+12
-0
No files found.
orbit/standard_runner.py
View file @
58a0c81c
...
@@ -124,6 +124,12 @@ class StandardTrainer(runner.AbstractTrainer, metaclass=abc.ABCMeta):
...
@@ -124,6 +124,12 @@ class StandardTrainer(runner.AbstractTrainer, metaclass=abc.ABCMeta):
context" for generality, to allow e.g. multiple iterator dequeues and calls
context" for generality, to allow e.g. multiple iterator dequeues and calls
to `strategy.run`.
to `strategy.run`.
Note that if `use_tf_function=True`, all the code inside `train_step` should
be tf.function compatible, as they will be traced with tf.function. This
means you cannot put arbitrary python code in this function. If users have
any numpy operations, they should be put in `train_loop_begin` or
`train_loop_end` functions.
Args:
Args:
iterator: A tf.nest-compatible structure of tf.data Iterator or
iterator: A tf.nest-compatible structure of tf.data Iterator or
DistributedIterator.
DistributedIterator.
...
@@ -228,6 +234,12 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
...
@@ -228,6 +234,12 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
context" for generality, to allow e.g. multiple iterator dequeues and calls
context" for generality, to allow e.g. multiple iterator dequeues and calls
to `strategy.run`.
to `strategy.run`.
Note that if `use_tf_function=True`, all the code inside `eval_step` should
be tf.function compatible, as they will be traced with tf.function. This
means you cannot put arbitrary python code in this function. If users have
any numpy operations, they should be put in `eval_begin`, `eval_end` or
`eval_reduce` functions.
Args:
Args:
iterator: A tf.nest-compatible structure of tf.data Iterator or
iterator: A tf.nest-compatible structure of tf.data Iterator or
DistributedIterator.
DistributedIterator.
...
...
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