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(
35
35
"//tensorflow_compression/python/layers:py_src" ,
36
36
"//tensorflow_compression/python/ops:py_src" ,
37
37
],
38
+ python_version = "PY3" ,
38
39
)
39
40
40
41
py_binary (
Original file line number Diff line number Diff line change 18
18
from __future__ import division as _division
19
19
from __future__ import print_function as _print_function
20
20
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
+
21
30
# pylint: disable=wildcard-import
22
31
from tensorflow_compression .python .layers .entropy_models import *
23
32
from tensorflow_compression .python .layers .gdn import *
You can’t perform that action at this time.
0 commit comments