Skip to content

Commit 424cf3a

Browse files
zehao-intelchensuyue
authored andcommitted
Adapt Example for TF2.14 AutoTrackable API Change (#1290)
Signed-off-by: zehao-intel <zehao.huang@intel.com> (cherry picked from commit 9079ff1)
1 parent e7cbd0e commit 424cf3a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/tensorflow/object_detection/tensorflow_models/faster_rcnn_inception_resnet_v2/quantization/ptq/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def evaluate(model):
5353
accuracy (float): evaluation result, the larger is better.
5454
"""
5555
from neural_compressor.model import Model
56-
from tensorflow.python.training.tracking.tracking import AutoTrackable
56+
from tensorflow.python.trackable.autotrackable import AutoTrackable
5757
warmup = 5
5858
iteration = -1
5959
if args.benchmark and args.mode == 'performance':

examples/tensorflow/object_detection/tensorflow_models/faster_rcnn_resnet101/quantization/ptq/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def evaluate(model):
5353
accuracy (float): evaluation result, the larger is better.
5454
"""
5555
from neural_compressor.model import Model
56-
from tensorflow.python.training.tracking.tracking import AutoTrackable
56+
from tensorflow.python.trackable.autotrackable import AutoTrackable
5757
warmup = 5
5858
iteration = -1
5959
if args.benchmark and args.mode == 'performance':

neural_compressor/adaptor/tf_utils/graph_converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
version1_lte_version2,
8484
)
8585

86-
TF_SUPPORTED_MAX_VERSION = "2.13.0"
86+
TF_SUPPORTED_MAX_VERSION = "2.14.0"
8787
TF_SUPPORTED_MIN_VERSION = "1.14.0"
8888

8989
logger = logging.getLogger("neural_compressor")

neural_compressor/adaptor/tf_utils/graph_converter_without_calib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
version1_lte_version2,
5757
)
5858

59-
TF_SUPPORTED_MAX_VERSION = "2.13.0"
59+
TF_SUPPORTED_MAX_VERSION = "2.14.0"
6060
TF_SUPPORTED_MIN_VERSION = "1.14.0"
6161

6262
logger = logging.getLogger("neural_compressor")

0 commit comments

Comments
 (0)