Skip to content

Commit 1123816

Browse files
Johannes Ball?copybara-github
authored andcommitted
Updates README with installation instructions.
PiperOrigin-RevId: 258643268 Change-Id: I02e0cf2fd826237e4cc423fa1d023d110ed62d19
1 parent 46dea8e commit 1123816

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ py_binary(
3535
"//tensorflow_compression/python/layers:py_src",
3636
"//tensorflow_compression/python/ops:py_src",
3737
],
38-
python_version = "PY3",
3938
)
4039

4140
py_binary(

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ For an introduction to lossy image compression with machine learning, take a
2222
look at @jonycgn's
2323
[talk on Learned Image Compression](https://www.youtube.com/watch?v=x_q7cZviXkY).
2424

25+
## Documentation & getting help
26+
27+
For usage questions and discussions, please head over to our
28+
[Google group](https://groups.google.com/forum/#!forum/tensorflow-compression).
29+
30+
Refer to
31+
[the API documentation](https://tensorflow.github.io/compression/docs/api_docs/python/tfc.html)
32+
for a complete description of the Keras layers and TensorFlow ops this package
33+
implements.
34+
35+
There's also an introduction to our `EntropyBottleneck` class
36+
[here](https://tensorflow.github.io/compression/docs/entropy_bottleneck.html),
37+
and a description of the range coding operators
38+
[here](https://tensorflow.github.io/compression/docs/range_coding.html).
39+
2540
## Quick start
2641

2742
### Installing release 1.1 (stable)
@@ -48,26 +63,27 @@ cd compression-1.1
4863
for i in tensorflow_compression/python/*/*_test.py; do python $i; done
4964
```
5065

51-
### Installing release 1.2b1 (beta)
66+
### Installing release 1.2b2 (beta)
5267

5368
Set up an environment in which you can install precompiled binary Python
5469
packages using the `pip` command. Refer to the
5570
[TensorFlow installation instructions](https://www.tensorflow.org/install/pip)
5671
for more information on how to set up such a Python environment.
5772

58-
Run the following command to install the binary PIP package:
73+
Install TensorFlow 1.14 or above with or without GPU support:
74+
```bash
75+
pip install tensorflow
76+
```
77+
or
78+
```bash
79+
pip install tensorflow-gpu
80+
```
5981

82+
Then, run the following command to install the binary PIP package:
6083
```bash
6184
pip install tensorflow-compression
6285
```
6386

64-
***Note: for this beta release, we only support Python 2.7 and 3.4 versions on
65-
Linux platforms. We are working on Darwin (Mac) binaries as well. For the time
66-
being, if you need to run the beta release on Mac, we suggest to use Docker
67-
Desktop for Mac, and run the above command inside a container based on the
68-
[TensorFlow docker image](https://www.tensorflow.org/install/docker) for
69-
Python 2.7.***
70-
7187
### Using the library
7288

7389
We recommend importing the library from your Python code as follows:
@@ -161,28 +177,13 @@ python bls2017.py [options] compress original.png compressed.bin
161177
python bls2017.py [options] decompress compressed.bin reconstruction.png
162178
```
163179

164-
## Help & documentation
165-
166-
For usage questions and discussions, please head over to our
167-
[Google group](https://groups.google.com/forum/#!forum/tensorflow-compression).
168-
169-
Refer to
170-
[the API documentation](https://tensorflow.github.io/compression/docs/api_docs/python/tfc.html)
171-
for a complete description of the Keras layers and TensorFlow ops this package
172-
implements.
173-
174-
There's also an introduction to our `EntropyBottleneck` class
175-
[here](https://tensorflow.github.io/compression/docs/entropy_bottleneck.html),
176-
and a description of the range coding operators
177-
[here](https://tensorflow.github.io/compression/docs/range_coding.html).
178-
179-
## Building PIP package
180+
## Building PIP packages
180181

181-
This section describes steps to build PIP package.
182+
This section describes steps to build PIP packages.
182183

183-
Docker image `tensorflow/tensorflow:custom-op` is used for PIP package build.
184-
Note that this is different from `tensorflow/tensorflow:devel`. To be compatible
185-
with TensorFlow PIP package, the GCC version must match, but
184+
We use the Docker image `tensorflow/tensorflow:nightly-custom-op` for building
185+
PIP packages. Note that this is different from `tensorflow/tensorflow:devel`. To
186+
be compatible with the TensorFlow PIP package, the GCC version must match, but
186187
`tensorflow/tensorflow:devel` has a different GCC version installed.
187188

188189
Inside a Docker container from the image, the following steps need to be done.
@@ -193,16 +194,15 @@ Inside a Docker container from the image, the following steps need to be done.
193194

194195
```bash
195196
sudo docker run -v /tmp/tensorflow_compression:/tmp/tensorflow_compression \
196-
tensorflow/tensorflow:custom-op \
197+
tensorflow/tensorflow:nightly-custom-op \
197198
bash -c "pip install tensorflow &&
198199
git clone https://github.com/tensorflow/compression.git
199200
/tensorflow_compression && cd /tensorflow_compression &&
200-
bazel run -c opt :build_pip_pkg"
201+
bazel run -c opt --copt=-mavx :build_pip_pkg"
201202
```
202203

203204
The wheel file is created inside `/tmp/tensorflow_compression`. Optimization
204-
flags can be passed via `--copt` to the `bazel run` command above. For example,
205-
`bazel` command above can be `bazel run -c opt --copt=-mavx :build_pip_pkg`.
205+
flags can be passed via `--copt` to the `bazel run` command above.
206206

207207
### Testing PIP package
208208

@@ -213,7 +213,7 @@ pip install /tmp/tensorflow_compression/tensorflow_compression-*.whl
213213
```
214214

215215
And run tests. (Do not run the tests in the workspace directory where
216-
`WORKSPACE` of `tensorflow_compression` repo lives. In that case, Python
216+
`WORKSPACE` of `tensorflow_compression` repo lives. In that case, the Python
217217
interpreter attempts to import `tensorflow_compression` packages from the source
218218
tree rather than from the installed package system directory.)
219219

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
scipy >= 1.0.0
2-
tensorflow >= 1.13.0
1+
scipy >= 1

0 commit comments

Comments
 (0)