diff options
author | 2017-11-02 23:05:37 -0700 | |
---|---|---|
committer | 2017-11-02 23:09:18 -0700 | |
commit | d8935f6414e36c6e1da95dbd13c876b7208c019b (patch) | |
tree | bcc1a3fb5674e76415c665d628716b0c3c727443 | |
parent | 902c91342a040cdab64afededf85332b92d75e40 (diff) |
eager: Update READMEs and links.
- guide.md: Update links now that documentation of the latest release (1.4)
includes what we want.
- model READMEs: The example models are included in the TensorFlow pip package,
so you do not need to build from source to run the benchmarks.
PiperOrigin-RevId: 174426563
3 files changed, 31 insertions, 9 deletions
diff --git a/tensorflow/contrib/eager/python/examples/resnet50/README.md b/tensorflow/contrib/eager/python/examples/resnet50/README.md index f6c1defa42..db023e6c97 100644 --- a/tensorflow/contrib/eager/python/examples/resnet50/README.md +++ b/tensorflow/contrib/eager/python/examples/resnet50/README.md @@ -11,7 +11,18 @@ Contents: # Benchmarks -Using a synthetic data. +Using a synthetic data, run: + +``` +# Using eager execution +python resnet50_test.py --benchmarks=. + +# Using graph execution +python resnet50_graph_test.py --benchmarks=. +``` + +The above uses the model definition included with the TensorFlow pip +package. To build (and run benchmarks) from source: ``` # Using eager execution diff --git a/tensorflow/contrib/eager/python/examples/rnn_ptb/README.md b/tensorflow/contrib/eager/python/examples/rnn_ptb/README.md index ea92d59e58..743ebb68ee 100644 --- a/tensorflow/contrib/eager/python/examples/rnn_ptb/README.md +++ b/tensorflow/contrib/eager/python/examples/rnn_ptb/README.md @@ -20,6 +20,18 @@ Benchmarks (using synthetic data): ``` # Using eager execution +python rnn_ptb_test.py --benchmarks=. + +# Using graph execution +python rnn_ptb_graph_test.py --benchmarks=. +``` + +The above uses the model definition included with the TensorFlow pip +package. To build (and run benchmarks) from source: + + +``` +# Using eager execution bazel run -c opt --config=cuda :rnn_ptb_test -- --benchmarks=. # Using graph execution diff --git a/tensorflow/contrib/eager/python/g3doc/guide.md b/tensorflow/contrib/eager/python/g3doc/guide.md index 230fc893bf..147b7047f4 100644 --- a/tensorflow/contrib/eager/python/g3doc/guide.md +++ b/tensorflow/contrib/eager/python/g3doc/guide.md @@ -388,7 +388,7 @@ many arguments. In fact, eager execution encourages use of the [Keras](https://keras.io)-style "Layer" classes in the -[`tf.layers`](https://www.tensorflow.org/versions/master/api_docs/python/tf/layers) +[`tf.layers`](https://www.tensorflow.org/api_docs/python/tf/layers) module. Furthermore, you may want to apply more sophisticated techniques to compute @@ -488,10 +488,10 @@ parameters of the model as arguments to the `loss` function. ### Using Keras and the Layers API [Keras](https://keras.io) is a popular API for defining model structures. The -[`tf.keras.layers`](https://www.tensorflow.org/versions/master/api_docs/python/tf/keras/layers) +[`tf.keras.layers`](https://www.tensorflow.org/api_docs/python/tf/keras/layers) module provides a set of building blocks for models and is implemented using the `tf.layers.Layer` subclasses in the -[`tf.layers`](https://www.tensorflow.org/versions/master/api_docs/python/tf/layers) +[`tf.layers`](https://www.tensorflow.org/api_docs/python/tf/layers) module. We encourage the use of these same building blocks when using TensorFlow's eager execution feature. For example, the very same linear regression model can be built using `tf.layers.Dense`: @@ -608,9 +608,9 @@ it provides conveniences like keeping track of all model variables and methods to save and restore from checkpoints. Sub-classes of `tfe.Network` may register `Layer`s (like classes in -[`tf.layers`](https://www.tensorflow.org/versions/master/api_docs/python/tf/layers), +[`tf.layers`](https://www.tensorflow.org/api_docs/python/tf/layers), or [Keras -layers](https://www.tensorflow.org/versions/master/api_docs/python/tf/keras/layers)) +layers](https://www.tensorflow.org/api_docs/python/tf/keras/layers)) using a call to `self.track_layer()` and define the computation in an implementation of `call()`. @@ -800,7 +800,7 @@ example in The discussion above has been centered around the computation executed by your model. The -[`tf.data`](https://www.tensorflow.org/versions/master/api_docs/python/tf/data) +[`tf.data`](https://www.tensorflow.org/api_docs/python/tf/data) module provides APIs to build complex input pipelines from simple, reusable pieces. @@ -810,8 +810,7 @@ However, the process of iterating over elements of the dataset differs between eager execution and graph construction. When eager execution is enabled, the discussion on iterator creation using `make_one_shot_iterator()` and `get_next()` in the -[Programmer's -Guide](https://www.tensorflow.org/versions/master/programmers_guide/datasets) is +[Programmer's Guide](https://www.tensorflow.org/programmers_guide/datasets) is *not* applicable. Instead, a more Pythonic `Iterator` class is available. For example: |