-
Notifications
You must be signed in to change notification settings - Fork 463
Description
Describe the bug
I am trying to convert a SSD-mobilenetv2 model from TensorFlow's object detection API to ONNX for use with TensorRT, however, I have been running into several problems. An onnx file gets saved however in the terminal the optimization seems to fail.
I am trying to follow the nvidia blog on optimizing tensorflow models with tensorRT. I included a link of it below. When trying to use the ONNX files even though there is no optimization, I get an error saying at least one output node is required. ( i have created a different post for that error).
Urgency
This is very urgent for hard project deadlines
2020-06-12 13:14:38.976453: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:14:43.232209: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer.so.6
2020-06-12 13:14:43.249407: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer_plugin.so.6
INFO:tensorflow:Saver not created because there are no variables in the graph to restore
2020-06-12 13:15:02,703 - INFO - tensorflow: Saver not created because there are no variables in the graph to restore
2020-06-12 13:15:07.104291: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-06-12 13:15:07.131981: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.132348: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.86GiB deviceMemoryBandwidth: 23.84GiB/s
2020-06-12 13:15:07.132533: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:15:07.132868: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-06-12 13:15:07.151975: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-06-12 13:15:07.183043: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-06-12 13:15:07.209363: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-06-12 13:15:07.225522: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-06-12 13:15:07.225758: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-12 13:15:07.226234: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.226618: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.226782: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-06-12 13:15:07.251852: W tensorflow/core/platform/profile_utils/cpu_utils.cc:98] Failed to find bogomips in /proc/cpuinfo; cannot determine CPU frequency
2020-06-12 13:15:07.252395: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2a8799b0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-06-12 13:15:07.252446: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-06-12 13:15:07.383170: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.383460: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2db61aa0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-06-12 13:15:07.383514: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): NVIDIA Tegra X1, Compute Capability 5.3
2020-06-12 13:15:07.383998: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.384120: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.86GiB deviceMemoryBandwidth: 23.84GiB/s
2020-06-12 13:15:07.384197: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:15:07.384247: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-06-12 13:15:07.384312: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-06-12 13:15:07.384359: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-06-12 13:15:07.384398: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-06-12 13:15:07.384441: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-06-12 13:15:07.384477: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-12 13:15:07.384640: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.384838: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:07.384912: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-06-12 13:15:07.384998: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:15:17.317440: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-12 13:15:17.317822: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2020-06-12 13:15:17.317967: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2020-06-12 13:15:17.321422: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:17.322350: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:17.325828: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 91 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
2020-06-12 13:15:36.220556: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:36.220775: I tensorflow/core/grappler/devices.cc:55] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0
2020-06-12 13:15:36.222241: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2020-06-12 13:15:36.232537: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:36.232755: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.86GiB deviceMemoryBandwidth: 23.84GiB/s
2020-06-12 13:15:36.232945: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:15:36.233045: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-06-12 13:15:36.233161: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-06-12 13:15:36.233227: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-06-12 13:15:36.233283: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-06-12 13:15:36.233336: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-06-12 13:15:36.233384: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-12 13:15:36.233592: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:36.233829: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:36.233926: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-06-12 13:15:36.234104: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-12 13:15:36.234190: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2020-06-12 13:15:36.234218: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2020-06-12 13:15:36.234482: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:36.234824: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:15:36.234983: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 91 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
2020-06-12 13:15:38.875298: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:841] Optimization results for grappler item: graph_to_optimize
2020-06-12 13:15:38.875400: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:843] function_optimizer: function_optimizer did nothing. time = 0.012ms.
2020-06-12 13:15:38.875427: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:843] function_optimizer: function_optimizer did nothing. time = 0.002ms.
2020-06-12 13:16:08.219007: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:08.219348: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.86GiB deviceMemoryBandwidth: 23.84GiB/s
2020-06-12 13:16:08.219720: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:16:08.219799: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-06-12 13:16:08.219888: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-06-12 13:16:08.219945: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-06-12 13:16:08.219991: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-06-12 13:16:08.220030: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-06-12 13:16:08.220067: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-12 13:16:08.220279: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:08.220523: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:08.220646: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-06-12 13:16:08.220731: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-12 13:16:08.220764: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2020-06-12 13:16:08.220794: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2020-06-12 13:16:08.221018: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:08.221271: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:08.221607: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 91 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
WARNING:tensorflow:From /home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/tf_loader.py:324: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.compat.v1.graph_util.extract_sub_graph
2020-06-12 13:16:15,038 - WARNING - tensorflow: From /home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/tf_loader.py:324: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.compat.v1.graph_util.extract_sub_graph
2020-06-12 13:16:19.547058: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:19.547224: I tensorflow/core/grappler/devices.cc:55] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0
2020-06-12 13:16:19.547889: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2020-06-12 13:16:19.549435: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:19.549579: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.86GiB deviceMemoryBandwidth: 23.84GiB/s
2020-06-12 13:16:19.549676: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:16:19.549733: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-06-12 13:16:19.549796: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-06-12 13:16:19.549838: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-06-12 13:16:19.549878: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-06-12 13:16:19.549919: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-06-12 13:16:19.549954: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-12 13:16:19.550114: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:19.550372: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:19.550446: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-06-12 13:16:19.550515: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-12 13:16:19.550548: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2020-06-12 13:16:19.550574: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2020-06-12 13:16:19.550750: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:19.550962: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:16:19.551071: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 91 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
2020-06-12 13:16:26.169866: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:841] Optimization results for grappler item: graph_to_optimize
2020-06-12 13:16:26.169994: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:843] constant_folding: Graph size after: 1145 nodes (-1401), 1266 edges (-1572), time = 1506.3ms.
2020-06-12 13:16:26.170033: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:843] function_optimizer: function_optimizer did nothing. time = 9.512ms.
2020-06-12 13:16:26.170068: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:843] constant_folding: Graph size after: 1145 nodes (0), 1266 edges (0), time = 166.712ms.
2020-06-12 13:16:26.170098: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:843] function_optimizer: function_optimizer did nothing. time = 7.143ms.
2020-06-12 13:17:40,106 - INFO - tf2onnx: inputs: ['image_tensor:0']
2020-06-12 13:17:40,107 - INFO - tf2onnx: outputs: ['detection_boxes:0', 'detection_classes:0', 'detection_multiclass_scores:0', 'detection_scores:0', 'num_detections:0', 'raw_detection_boxes:0', 'raw_detection_scores:0']
2020-06-12 13:17:50.730974: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:17:50.775618: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X1 computeCapability: 5.3
coreClock: 0.9216GHz coreCount: 1 deviceMemorySize: 3.86GiB deviceMemoryBandwidth: 23.84GiB/s
2020-06-12 13:17:50.776233: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-06-12 13:17:50.805733: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-06-12 13:17:50.813606: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-06-12 13:17:50.813805: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-06-12 13:17:50.813887: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-06-12 13:17:50.813957: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-06-12 13:17:50.838794: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-06-12 13:17:50.839162: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:17:50.839483: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:17:50.839756: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-06-12 13:17:50.841203: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-06-12 13:17:50.841336: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2020-06-12 13:17:50.841537: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2020-06-12 13:17:50.841959: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:17:50.842432: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2020-06-12 13:17:50.842651: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 91 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
2020-06-12 13:17:50,858 - INFO - tf2onnx.tfonnx: Using tensorflow=2.1.0, onnx=1.7.0, tf2onnx=1.7.0/b73231
2020-06-12 13:17:50,859 - INFO - tf2onnx.tfonnx: Using opset <onnx, 11>
2020-06-12 13:22:56,748 - VERBOSE - tf2onnx.tfonnx: Mapping TF node to ONNX node(s)
2020-06-12 13:23:08,815 - VERBOSE - tf2onnx.tfonnx: Summay Stats:
tensorflow ops: Counter({'Const': 597, 'Identity': 109, 'FusedBatchNorm': 64, 'Conv2D': 55, 'Relu6': 47, 'GatherV2': 26, 'Sub': 21, 'DepthwiseConv2dNative': 21, 'Reshape': 20, 'StridedSlice': 18, 'Add': 15, 'Mul': 14, 'Shape': 14, 'ExpandDims': 12, 'BiasAdd': 10, 'Select': 10, 'ConcatV2': 9, 'Pack': 9, 'Greater': 8, 'Slice': 7, 'Unpack': 6, 'Squeeze': 5, 'Minimum': 5, 'Split': 4, 'Maximum': 4, 'Cast': 4, 'Pad': 4, 'Assert': 3, 'Fill': 3, 'Transpose': 2, 'Exp': 2, 'NonMaxSuppressionV3': 2, 'Less': 2, 'Equal': 2, 'TopKV2': 2, 'Range': 2, 'Placeholder': 1, 'ResizeBilinear': 1, 'Sigmoid': 1, 'Where': 1, 'Size': 1, 'GreaterEqual': 1, 'Sum': 1})
tensorflow attr: Counter({'dtype': 598, 'value': 597, 'T': 515, 'data_format': 150, 'dilations': 76, 'strides': 76, 'padding': 76, 'epsilon': 64, 'is_training': 64, 'explicit_paddings': 55, 'use_cudnn_on_gpu': 55, 'Taxis': 26, 'batch_dims': 26, 'Tindices': 26, 'Tparams': 26, 'Index': 25, 'Tshape': 20, 'N': 18, 'shrink_axis_mask': 18, 'ellipsis_mask': 18, 'begin_mask': 18, 'new_axis_mask': 18, 'end_mask': 18, 'axis': 15, 'out_type': 15, 'Tdim': 12, 'Tidx': 12, 'num': 6, 'squeeze_dims': 5, 'num_split': 4, 'SrcT': 4, 'Truncate': 4, 'DstT': 4, 'Tpaddings': 4, 'summarize': 3, 'index_type': 3, 'Tperm': 2, 'T_threshold': 2, 'incompatible_shape_error': 2, 'sorted': 2, 'shape': 1, 'align_corners': 1, 'half_pixel_centers': 1, 'keep_dims': 1})
onnx mapped: Counter({'Const': 556, 'Identity': 109, 'FusedBatchNorm': 64, 'Conv2D': 55, 'Relu6': 47, 'GatherV2': 26, 'Sub': 21, 'DepthwiseConv2dNative': 21, 'Reshape': 20, 'StridedSlice': 18, 'Add': 15, 'Mul': 14, 'Shape': 14, 'ExpandDims': 12, 'Select': 10, 'ConcatV2': 9, 'Pack': 9, 'Greater': 8, 'Slice': 7, 'Unpack': 6, 'Squeeze': 5, 'Minimum': 5, 'Split': 4, 'Maximum': 4, 'Cast': 4, 'Pad': 4, 'Fill': 3, 'Transpose': 2, 'Exp': 2, 'NonMaxSuppressionV3': 2, 'Less': 2, 'TopKV2': 2, 'Range': 2, 'Placeholder': 1, 'ResizeBilinear': 1, 'Sigmoid': 1, 'Where': 1, 'GreaterEqual': 1, 'Sum': 1})
onnx unmapped: Counter()
2020-06-12 13:23:08,818 - INFO - tf2onnx.optimizer: Optimizing ONNX model
2020-06-12 13:23:08,843 - VERBOSE - tf2onnx.optimizer: Apply optimize_transpose
2020-06-12 13:23:09,907 - WARNING - tf2onnx.optimizer: Failed to apply optimize_transpose
Traceback (most recent call last):
File "/home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/optimizer/init.py", line 50, in optimize_graph
current = copy.deepcopy(graph)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 220, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 220, in
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 159, in deepcopy
copier = getattr(x, "deepcopy", None)
ReferenceError: weakly-referenced object no longer exists
2020-06-12 13:23:09,942 - VERBOSE - tf2onnx.optimizer: Apply fold_constants
2020-06-12 13:23:11,047 - WARNING - tf2onnx.optimizer: Failed to apply fold_constants
Traceback (most recent call last):
File "/home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/optimizer/init.py", line 50, in optimize_graph
current = copy.deepcopy(graph)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 220, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 220, in
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 159, in deepcopy
copier = getattr(x, "deepcopy", None)
ReferenceError: weakly-referenced object no longer exists
2020-06-12 13:23:11,072 - VERBOSE - tf2onnx.optimizer: Apply loop_optimizer
2020-06-12 13:23:11,671 - WARNING - tf2onnx.optimizer: Failed to apply loop_optimizer
Traceback (most recent call last):
File "/home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/optimizer/init.py", line 50, in optimize_graph
current = copy.deepcopy(graph)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 220, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 220, in
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 159, in deepcopy
copier = getattr(x, "deepcopy", None)
ReferenceError: weakly-referenced object no longer exists
2020-06-12 13:23:11,696 - VERBOSE - tf2onnx.optimizer: Apply merge_duplication
2020-06-12 13:23:12,768 - WARNING - tf2onnx.optimizer: Failed to apply merge_duplication
Traceback (most recent call last):
File "/home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/optimizer/init.py", line 50, in optimize_graph
current = copy.deepcopy(graph)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 220, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 220, in
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 159, in deepcopy
copier = getattr(x, "deepcopy", None)
ReferenceError: weakly-referenced object no longer exists
2020-06-12 13:23:12,793 - VERBOSE - tf2onnx.optimizer: Apply remove_identity
2020-06-12 13:23:13,397 - WARNING - tf2onnx.optimizer: Failed to apply remove_identity
Traceback (most recent call last):
File "/home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/optimizer/init.py", line 50, in optimize_graph
current = copy.deepcopy(graph)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 220, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 220, in
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 159, in deepcopy
copier = getattr(x, "deepcopy", None)
ReferenceError: weakly-referenced object no longer exists
2020-06-12 13:23:13,423 - VERBOSE - tf2onnx.optimizer: Apply remove_back_to_back
2020-06-12 13:23:14,465 - WARNING - tf2onnx.optimizer: Failed to apply remove_back_to_back
Traceback (most recent call last):
File "/home/anoushs/.local/lib/python3.6/site-packages/tf2onnx/optimizer/init.py", line 50, in optimize_graph
current = copy.deepcopy(graph)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 220, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 220, in
y = [deepcopy(a, memo) for a in x]
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 159, in deepcopy
copier = getattr(x, "deepcopy", None)
ReferenceError: weakly-referenced object no longer exists
2020-06-12 13:23:14,693 - INFO - tf2onnx.optimizer: After optimization: no change
2020-06-12 13:23:16,197 - INFO - tf2onnx:
2020-06-12 13:23:16,197 - INFO - tf2onnx: Successfully converted TensorFlow model saved_model2 to ONNX
2020-06-12 13:23:16,600 - INFO - tf2onnx: ONNX model is saved at mobilenetv2_updated11_from_src.onnx
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
- Tensorflow Version: 2.1.0
- Python version: 3.6.9
To Reproduce
python3 -m tf2onnx.convert --saved-model saved_model_dir --opset 11 --verbose --output output_file.onnx