Path: blob/master/site/en-snapshot/tfx/guide/train.md
56961 views
Designing TensorFlow Modeling Code For TFX
When designing your TensorFlow modeling code for TFX there are a few items to be aware of, including the choice of a modeling API.
Consumes: SavedModel from Transform, and data from ExampleGen
Emits: Trained model in SavedModel format
- New TFX pipelines should use TensorFlow 2.x with Keras models via the Generic Trainer.
- Full support for TensorFlow 2.X, including improved support for tf.distribute, will be added incrementally in upcoming releases.
- Previous TFX pipelines can continue to use TensorFlow 1.15. To switch them to TensorFlow 2.X, see the TensorFlow migration guide.
To keep up to date on TFX releases, see the TFX OSS Roadmap, read the TFX blog and subscribe to the TensorFlow newsletter.
Your model's input layer should consume from the SavedModel that was created by a Transform component, and the layers of the Transform model should be included with your model so that when you export your SavedModel and EvalSavedModel they will include the transformations that were created by the Transform component.
A typical TensorFlow model design for TFX looks like this: