File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ py_binary(
3535 "//tensorflow_compression/python/layers:py_src" ,
3636 "//tensorflow_compression/python/ops:py_src" ,
3737 ],
38+ python_version = "PY3" ,
3839)
3940
4041py_binary (
Original file line number Diff line number Diff line change 1818from __future__ import division as _division
1919from __future__ import print_function as _print_function
2020
21+ try :
22+ import tensorflow as _tensorflow
23+ _tf_version = [int (v ) for v in _tensorflow .version .VERSION .split ("." )]
24+ assert _tf_version [0 ] == 1 and _tf_version [1 ] >= 14
25+ except (ImportError , AssertionError ):
26+ raise RuntimeError ("For tensorflow_compression, please install TensorFlow "
27+ "1.14 or above. TensorFlow 2 is not yet supported." )
28+
29+
2130# pylint: disable=wildcard-import
2231from tensorflow_compression .python .layers .entropy_models import *
2332from tensorflow_compression .python .layers .gdn import *
You can’t perform that action at this time.
0 commit comments