Skip to content

Commit 0689a6b

Browse files
Johannes Ballécopybara-github
authored andcommitted
Fixes one-line scripts to install TFC.
PiperOrigin-RevId: 468198363 Change-Id: I8a7086b3ffcc641448cc2e05e5cfed61887de70b
1 parent 32dda61 commit 0689a6b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ installed TensorFlow version. Run it in a cell before executing your Python
9595
code:
9696

9797
```
98-
!pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d\\.\\d).*/\\1.0/sg')
98+
!pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d+\\.\\d+).*/\\1.0/sg')
9999
```
100100

101101
Note: The binary packages of TFC are tied to TF with the same minor version

models/hific/colab.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"outputs": [],
3333
"source": [
3434
"# Installs the latest version of TFC compatible with the installed TF version.\n",
35-
"!pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d\\.\\d).*/\\1.0/sg')\n",
35+
"!pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d+\\.\\d+).*/\\1.0/sg')\n",
3636
"\n",
3737
"# Downloads the 'models' directory from Github.\n",
3838
"![[ -e /tfc ]] || git clone https://github.com/tensorflow/compression /tfc\n",

models/toy_sources/toy_sources.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"# directly in a Colaboratory hosted runtime from Github.\n",
3939
"\n",
4040
"# Installs the latest version of TFC compatible with the installed TF version.\n",
41-
"!pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d\\.\\d).*/\\1.0/sg')\n",
41+
"!pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d+\\.\\d+).*/\\1.0/sg')\n",
4242
"\n",
4343
"# Downloads the 'models' directory from Github.\n",
4444
"![[ -e /tfc ]] || git clone https://github.com/tensorflow/compression /tfc\n",

0 commit comments

Comments
 (0)