Skip to content

Commit f77a143

Browse files
alanchiaotensorflower-gardener
authored andcommitted
Move installation instructions to tensorflow.org/model_optimization for
visibility. PiperOrigin-RevId: 304509502
1 parent fad9b21 commit f77a143

File tree

3 files changed

+44
-38
lines changed

3 files changed

+44
-38
lines changed

README.md

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,9 @@ The website also provides various tutorials and API docs.
1212
The toolkit provides stable Python APIs.
1313

1414
## Installation
15+
For installation instructions, see
16+
[tensorflow.org/model_optimization/guide/install](https://www.tensorflow.org/model_optimization/guide/install).
1517

16-
### Stable Builds
17-
18-
To install the latest version, run the following:
19-
20-
```shell
21-
# Installing with the `--upgrade` flag ensures you'll get the latest version.
22-
pip install --user --upgrade tensorflow-model-optimization
23-
```
24-
25-
For release details, see our
26-
[release notes](https://github.com/tensorflow/model-optimization/releases).
27-
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).
32-
33-
Since TensorFlow is *not* included as a dependency of the TensorFlow Model
34-
Optimization package (in `setup.py`), you must explicitly install the TensorFlow
35-
package (`tf-nightly` or `tf-nightly-gpu`). This allows us to maintain one
36-
package instead of separate packages for CPU and GPU-enabled TensorFlow.
37-
38-
### Installing from Source
39-
40-
You can also install from source. This requires the
41-
[Bazel](https://bazel.build/) build system.
42-
43-
```shell
44-
# To install dependencies on Ubuntu:
45-
# sudo apt-get install bazel git python-pip
46-
# For other platforms, see Bazel docs above.
47-
git clone https://github.com/tensorflow/model-optimization.git
48-
cd model_optimization
49-
bazel build --copt=-O3 --copt=-march=native :pip_pkg
50-
PKGDIR=$(mktemp -d)
51-
./bazel-bin/pip_pkg $PKGDIR
52-
pip install --user --upgrade $PKGDIR/*.whl
53-
```
5418
## Contribution guidelines
5519

5620
**If you want to contribute to TensorFlow Model Optimization, be sure to review

tensorflow_model_optimization/g3doc/_book.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ upper_tabs:
1919
path: /model_optimization/guide/get_started
2020
- title: Optimize further
2121
path: /model_optimization/guide/optimize_further
22+
- title: Install
23+
path: /model_optimization/guide/install
2224
- title: Roadmap
2325
path: /model_optimization/guide/roadmap
2426

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Install TensorFlow Model Optimization
2+
3+
### Stable Builds
4+
5+
To install the latest version, run the following:
6+
7+
```shell
8+
# Installing with the `--upgrade` flag ensures you'll get the latest version.
9+
pip install --user --upgrade tensorflow-model-optimization
10+
```
11+
12+
For release details, see our
13+
[release notes](https://github.com/tensorflow/model-optimization/releases).
14+
15+
For the required version of TensorFlow and other compatibility information, see
16+
the API Compatibility Matrix section of the Overview page for the technique you
17+
intend to use. For instance, for pruning, the Overview page is
18+
[here](https://www.tensorflow.org/model_optimization/guide/pruning).
19+
20+
Since TensorFlow is *not* included as a dependency of the TensorFlow Model
21+
Optimization package (in `setup.py`), you must explicitly install the TensorFlow
22+
package (`tf-nightly` or `tf-nightly-gpu`). This allows us to maintain one
23+
package instead of separate packages for CPU and GPU-enabled TensorFlow.
24+
25+
### Installing from Source
26+
27+
You can also install from source. This requires the
28+
[Bazel](https://bazel.build/) build system.
29+
30+
```shell
31+
# To install dependencies on Ubuntu:
32+
# sudo apt-get install bazel git python-pip
33+
# For other platforms, see Bazel docs above.
34+
git clone https://github.com/tensorflow/model-optimization.git
35+
cd model_optimization
36+
bazel build --copt=-O3 --copt=-march=native :pip_pkg
37+
PKGDIR=$(mktemp -d)
38+
./bazel-bin/pip_pkg $PKGDIR
39+
pip install --user --upgrade $PKGDIR/*.whl
40+
```

0 commit comments

Comments
 (0)