try to convert tensorflow model ssd_mobilenet_v1 to tensorRT

when I try to convert TensorFlow object detection API model ssd_mobilenet_v1 to tensorRT I got this error what is the issue?

I used jetpack 4.2.3 and Tensorflow 13.1

/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
_np_qint8 = np.dtype([(“qint8”, np.int8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
_np_quint8 = np.dtype([(“quint8”, np.uint8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
_np_qint16 = np.dtype([(“qint16”, np.int16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
_np_quint16 = np.dtype([(“quint16”, np.uint16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
_np_qint32 = np.dtype([(“qint32”, np.int32, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
np_resource = np.dtype([(“resource”, np.ubyte, 1)])
Traceback (most recent call last):
File “tf_trt.py”, line 14, in
from tf_trt_models.detection import download_detection_model, build_detection_graph
File “/home/shreyas/tf_trt_models/tf_trt_models/detection.py”, line 3, in
from object_detection import exporter
File “/home/shreyas/models/research/object_detection/exporter.py”, line 24, in
from object_detection.builders import model_builder
File “/home/shreyas/models/research/object_detection/builders/model_builder.py”, line 47, in
from object_detection.models.ssd_mobilenet_edgetpu_feature_extractor import SSDMobileNetEdgeTPUFeatureExtractor
File “/home/shreyas/models/research/object_detection/models/ssd_mobilenet_edgetpu_feature_extractor.py”, line 19, in
from object_detection.models import ssd_mobilenet_v3_feature_extractor
File “/home/shreyas/models/research/object_detection/models/ssd_mobilenet_v3_feature_extractor.py”, line 25, in
from nets.mobilenet import mobilenet
File “/home/shreyas/models/research/slim/nets/mobilenet/mobilenet.py”, line 399, in
def global_pool(input_tensor, pool_op=tf.compat.v2.nn.avg_pool2d):
AttributeError: module ‘tensorflow._api.v1.compat’ has no attribute ‘v2’

Hi,

Can you try upgrading TF to 2.1?

Also, please refer below link in case it helps:
https://github.com/tensorflow/probability/issues/354

Thanks