Skip to content

Commit cc05be8

Browse files
alanchiaotensorflower-gardener
authored andcommitted
Clarify and highlight API compatibility with pruning.
PiperOrigin-RevId: 284038715
1 parent f13568b commit cc05be8

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ pip install --user --upgrade tensorflow-model-optimization
2525
For release details, see our
2626
[release notes](https://github.com/tensorflow/model-optimization/releases).
2727

28-
TensorFlow Model Optimization requires either Tensorflow 1.x for versions 1.14+
29-
or the nightly build of [TensorFlow](https://www.tensorflow.org/install) (pip
30-
package `tf-nightly`). Note that for the nightly build, you need to use
31-
tf.compat.v1 since 2.x is the default now.
28+
For the required version of TensorFlow and other compatibility information, see
29+
the API Compatibility Matrix section of the Overview page for the technique you
30+
intend to use. For instance, for pruning, the Overview page is
31+
[here](https://www.tensorflow.org/model_optimization/guide/pruning).
3232

3333
Since TensorFlow is *not* included as a dependency of the TensorFlow Model
3434
Optimization package (in `setup.py`), you must explicitly install the TensorFlow

tensorflow_model_optimization/g3doc/guide/pruning/index.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ The technique is being evaluated in various speech applications, such as
2222
speech recognition and text-to-speech, and has been experimented on across
2323
various vision and translation models.
2424

25-
Users can apply this technique using APIs for Keras on Tensorflow 1.x for
26-
versions 1.14+ and tf-nightly in both graph and eager execution. Note that in
27-
tf-nightly, you must use tf.compat.v1 since 2.x is the default now.
25+
### API Compatibility Matrix
26+
Users can apply pruning with the following APIs:
2827

29-
Note: The pruning API is only compatible with `tf.distribute` when using graph
30-
execution.
28+
* Model building: `tf.keras` with only Sequential and Functional models
29+
* TensorFlow versions: TF 1.x for versions 1.14+
30+
* TensorFlow execution mode: both graph and eager
31+
* Distributed training: `tf.distribute` with only graph execution
3132

32-
It is on our roadmap to bring full support to TF 2.x and eager execution.
33+
It is on our roadmap to add support in the following areas:
34+
* TF 2.x (moderate testing has been done)
35+
* [Minimal Subclassed model support](https://github.com/tensorflow/model-optimization/issues/155)
3336

3437
## Results
3538

0 commit comments

Comments
 (0)