Provide details on the platforms you are using:
Linux distro and version: Ubuntu 16.04
GPU: Nvidia RTX2070
nvidia driver 418.88
UFF Version 0.6.3
Describe the problem
Hi, I am trying to to implement a model that utilizes a stagewise regression algorithm.
Like many others, I have generated a frozen model as .pb and am trying to convert it to the .uff format and subsequently the .plan format.
In the model, I have a input tensor of shape [Batch x 3 x 3] that I’d like to perform reduce_sum on as follows:
#input_shape [n, 3, 3] output = tf.reduce_sum(input, axis=2) #output_shape [n, 3]
When converting from .pb to .uff, I get the following warning:
Warning: keepdims is ignored by the UFF Parser and defaults to True
So sure, I go ahead with applying a
tf.squeeze() to remove the redundant axis as follows:
output = tf.reduce_sum(input, axis=2, keepdims=True) output = tf.squeeze(output)
Subsequently, when trying to convert the model to .plan using the UFFParser, I get the following error:
[Error] UffParser: Parser error: ssr_function/Sum: Invalid reduction axes
Which still occurs regardless of which axis I attempt to reduce_sum o.n
(Tried axis=1 and axis=2. I can’t specify axis=0 as that is the batch dimension).
I get the same error when using tf.keras.backend.Mean() despite it being listed as a supported op on in the TensorRT documentation.
I think there might be a bug in the UFFparser when it comes to reduce operations as specifying non-batch axes still raise the invalid axes area.
Any help regarding this issue will be greatly appreciated!