ValueError: new_axis_mask not supported

Hi,

Appears when converting pb file to uff:

Using output node pred_sbbox/concat_2
Using output node pred_mbbox/concat_2
Using output node pred_lbbox/concat_2
Converting to UFF graph
Warning: No conversion function registered for layer: Cast yet.
Converting pred_lbbox/Cast as custom op: Cast
WARNING:tensorflow:From /usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py:179: The name tf.AttrValue is deprecated. Please use tf.compat.v1.AttrValue instead.

Warning: No conversion function registered for layer: Tile yet.
Converting pred_lbbox/Tile_2 as custom op: Tile
Traceback (most recent call last):
  File "/usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py", line 93, in <module>
    main()
  File "/usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py", line 89, in main
    debug_mode=args.debug
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 233, in from_tensorflow_frozen_model
    return from_tensorflow(graphdef, output_nodes, preprocessor, **kwargs)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 181, in from_tensorflow
    debug_mode=debug_mode)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py", line 94, in convert_tf2uff_graph
    uff_graph, input_replacements, debug_mode=debug_mode)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py", line 79, in convert_tf2uff_node
    op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes, debug_mode=debug_mode)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py", line 47, in convert_layer
    return cls.registry_[op](name, tf_node, inputs, uff_graph, **kwargs)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter_functions.py", line 583, in convert_strided_slice
    raise ValueError("new_axis_mask not supported")
ValueError: new_axis_mask not supported

Please help me!
Thanks.
[/quote]

Hi,

The model files has “Cast” operations which is not supported in UFF parser.
Please find the below link:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-api/python_api/uff/Operators.html

You can try tf2onnx + ONNX parser as an alternative.
https://github.com/onnx/tensorflow-onnx

Thanks

Hi,

The model files has “Cast” operations which is not supported in UFF parser.
I found that there is also a “Tile” operation, which is not supported?

Thanks
[/quote]

Hi,

Yes, you can use ONNX parser as an alternative.

Tile and Cast both the operations seems to be supported in ONNX parser.
Please refer to below link for more details
https://github.com/onnx/onnx-tensorrt/blob/master/operators.md

Thanks

Hi,

Is there an example of yolov3 model trained by tensorflow for deepstream?
Can provide one?

Thanks
[/quote]

Hi,

Please refer below link for all the deepstream related information:
https://developer.nvidia.com/deepstream-sdk

Thanks

I have tried to use the tf2onnx convert yolov3.pb -> yolov3.onnx. (https://github.com/onnx/tensorflow-onnx)
The yolov3 tensorflow model comes from https://github.com/YunYang1994/tensorflow-yolov3/blob/master/freeze_graph.py#L23.
But when I modified the tensorrt mnist_onnx_sample to parse the yolov3.onnx, encounter the problem below:

(py35) xiaoga@xiaoga-Lenovo:~/到 TensorRT-5.1.5.0 的链接/bin$ ./sample_onnx_mnist
&&&& RUNNING TensorRT.sample_onnx_mnist # ./sample_onnx_mnist
----------------------------------------------------------------
Input filename:   ../../../data/mnist/yolov3.onnx
ONNX IR version:  0.0.4
Opset version:    7
Producer name:    tf2onnx
Producer version: 1.5.3
Domain:           
Model version:    0
Doc string:       
----------------------------------------------------------------
WARNING: ONNX model has a newer ir_version (0.0.4) than this parser was built against (0.0.3).
While parsing node number 151 [Slice]:
ERROR: builtin_op_importers.cpp:2041 In function importSlice:
[8] Assertion failed: std::find(axes.begin(), axes.end(), BATCH_DIM) == axes.end()
[E] Failure while parsing ONNX file
&&&& FAILED TensorRT.sample_onnx_mnist # ./sample_onnx_mnist
sample_onnx_mnist: sampleOnnxMNIST.cpp:212: int main(int, char**): Assertion `trtModelStream != nullptr' failed.
已放弃 (核心已转储)

Please give some advice and thanns a lot!