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
acc08b6f
Commit
acc08b6f
authored
Aug 25, 2022
by
Mark Daoust
Committed by
A. Unique TensorFlower
Aug 25, 2022
Browse files
Clarify the tfmodels landing page.
PiperOrigin-RevId: 470098255
parent
4a34c084
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
docs/index.md
docs/index.md
+18
-14
No files found.
docs/index.md
View file @
acc08b6f
...
@@ -104,7 +104,23 @@ processing, training, and model execution.
...
@@ -104,7 +104,23 @@ processing, training, and model execution.
## Training loops with Orbit {:#orbit}
## Training loops with Orbit {:#orbit}
The Orbit tool is a flexible, lightweight library designed to make it easier to
There are two default options for training TensorFlow models:
*
Use the high-level Keras
[
Model.fit
](
https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit
)
function. If your model and training procedure fit the assumptions of Keras'
`Model.fit`
(incremental gradient descent on batches of data) method this can
be very convenient.
*
Write a custom training loop
[
with keras
](
https://www.tensorflow.org/guide/keras/writing_a_training_loop_from_scratch
)
,
or
[
without
](
https://www.tensorflow.org/guide/core/logistic_regression_core
)
.
You can write a custom training loop with low-level TensorFlow methods such as
`tf.GradientTape`
or
`tf.function`
. However, this approach requires a lot of
boilerplate code, and doesn't do anything to simplify distributed training.
Orbit tries to provide a third option in between these two extremes.
Orbit is a flexible, lightweight library designed to make it easier to
write custom training loops in TensorFlow 2.x, and works well with the Model
write custom training loops in TensorFlow 2.x, and works well with the Model
Garden
[
training experiment framework
](
#training_framework
)
. Orbit handles
Garden
[
training experiment framework
](
#training_framework
)
. Orbit handles
common model training tasks such as saving checkpoints, running model
common model training tasks such as saving checkpoints, running model
...
@@ -114,19 +130,7 @@ GPU, and TPU hardware. The Orbit tool is also [open
...
@@ -114,19 +130,7 @@ GPU, and TPU hardware. The Orbit tool is also [open
source
](
https://github.com/tensorflow/models/blob/master/orbit/LICENSE
)
, so you
source
](
https://github.com/tensorflow/models/blob/master/orbit/LICENSE
)
, so you
can extend and adapt to your model training needs.
can extend and adapt to your model training needs.
You generally train TensorFlow models by writing a
The Orbit guide is available
[
here
](
orbit/index.ipynb
)
.
[
custom training loop
](
https://www.tensorflow.org/guide/keras/writing_a_training_loop_from_scratch
)
,
or using the high-level Keras
[
Model.fit
](
https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit
)
function. For simple models, you can define and manage a custom training loop
with low-level TensorFlow methods such as
`tf.GradientTape`
or
`tf.function`
.
Alternatively, you can use the high-level Keras
`Model.fit`
.
However, if your model is complex and your training loop requires more flexible
control or customization, then you should use Orbit. You can define most of your
training loop by the
`orbit.AbstractTrainer`
or
`orbit.StandardTrainer`
class.
Learn more about the Orbit tool in the
[
Orbit API documentation
](
https://www.tensorflow.org/api_docs/python/orbit
)
.
Note: You can customize how the Keras API executes training. Mainly you must
Note: You can customize how the Keras API executes training. Mainly you must
override the
`Model.train_step`
method or use
`keras.callbacks`
like
override the
`Model.train_step`
method or use
`keras.callbacks`
like
...
...
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