• Hardware (RTX 3090)
• Network Type (Mask_rcnn)
• TLT Version dockers: [['nvidia/tao/tao-toolkit-tf', 'nvidia/tao/tao-toolkit-pyt', 'nvidia/tao/tao-toolkit-lm'] format_version: 2.0 toolkit_version: 3.21.11 published_date: 11/08/2021
]
• Training spec file(
maskrcnn_retrain_resnet50.txt (2.0 KB)
)
• How to reproduce the issue –
So I trained the maskrcnn model with r50 backbone on a custom dataset and successfully pruned it.
Upon Retraining of pruned model I tried to export it to fp32/16 format
Here is the command I used for exporint:
tao mask_rcnn export -m /workspace/tao-experiments/mask_rcnn/experiments/experiment_dir_pruned_p70/model.step-40000.tlt -k nvidia_tlt -e /workspace/tao-experiments/mask_rcnn/specs/maskrcnn_retrain_resnet50.txt --batch_size 1 --engine_file /workspace/tao-experiments/mask_rcnn/experiments/experiment_dir_pruned_p70/export/model.step-40000.engine
in this command I am getting this error:
[TensorRT] ERROR: UffParser: Validator error: block_4c_bn_3/cond/Switch: Unsupported operation _Switch
2021-12-13 13:15:00,471 [ERROR] iva.common.export.trt_utils: Failed to parse UFF File
Here is error log:
.
.
.
Warning: No conversion function registered for layer: GenerateDetection_TRT yet.
Converting generate_detections as custom op: GenerateDetection_TRT
Warning: No conversion function registered for layer: MultilevelProposeROI_TRT yet.
Converting multilevel_propose_rois as custom op: MultilevelProposeROI_TRT
Warning: No conversion function registered for layer: MultilevelCropAndResize_TRT yet.
Converting pyramid_crop_and_resize_box as custom op: MultilevelCropAndResize_TRT
DEBUG [/usr/local/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py:96] Marking ['generate_detections', 'mask_fcn_logits/BiasAdd'] as outputs
2021-12-13 13:14:59,450 [INFO] iva.mask_rcnn.export.exporter: Converted model was saved into /workspace/tao-experiments/mask_rcnn/experiments/experiment_dir_pruned_p70/model.step-40000.etlt
[TensorRT] ERROR: UffParser: Validator error: block_4c_bn_3/cond/Switch: Unsupported operation _Switch
2021-12-13 13:15:00,471 [ERROR] iva.common.export.trt_utils: Failed to parse UFF File
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/trt_utils.py", line 301, in _load_from_files
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/trt_utils.py", line 301, in _load_from_files
AssertionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/mask_rcnn/scripts/export.py", line 12, in <module>
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/app.py", line 265, in launch_export
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/app.py", line 247, in run_export
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/mask_rcnn/export/exporter.py", line 654, in export
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/trt_utils.py", line 291, in __init__
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/trt_utils.py", line 164, in __init__
File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/common/export/trt_utils.py", line 309, in _load_from_files
AssertionError: UFF parsing failed on line 301 in statement
2021-12-13 18:45:02,008 [INFO] tlt.components.docker_handler.docker_handler: Stopping container.
Not sure why this is happening? Shouldn’t the trained tao model be by default ready to export?
Why would we get this error in the default model itself?
Dataset used for training is private.
Please see the attached config file to see the params used for training.