UffParser error: Order size is not matching the number dimensions of TensorRT

OS: Windows 10
TensorRT version: 6.0

Hi,

I’m using TensorRT C++ API to deploy my network trained with TensorFlow. But I just overcome a UffParser error:

UffParser: Parser error: fc1/conv1d/Conv2D: Order size is not matching the number dimensions of TensorRT

Here is the Network diagram in Tensorboard:

Here is the Logs:

I have no idea why this happened, anyone help?

Thx in advance!

Hi,

Based on the error message it seems that Uffparser is trying to process the layer whose format is not NCHW.
Could you modify your model to make sure it’s all NCHW format and try again?

If issue persist, could you please share the script and model file so we can help better?

Thanks

Hi,

I have changed my Tensorflow conv2d layer format to NCHW and retrained the network.

However, the UFFParser still failed to parse the model and throw out an exception msg: “invalid unordered_map<K, T> key”.

Here is the Uffparser try-catch Code:

try
        {
            if (!parser->parse(uffFilePath.c_str(), *network, DataType::kFLOAT))
            {
                gLogError << "Failure while parsing UFF file" << std::endl;
                return false;
            }
        }
        catch (const std::exception& e)
        {
            std::cerr << e.what() << std::endl;
            system("pause");
        }

Log:

[01/14/2020-11:20:23] [V] [TRT] UFFParser: transpose -> [8192,128]
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Applying order forwarding to: transpose
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Parsing fc1/conv1d/ExpandDims[Op: ExpandDims]. Inputs: transpose
[01/14/2020-11:20:23] [V] [TRT] UFFParser: fc1/conv1d/ExpandDims -> [128,1,8192]
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Applying order forwarding to: fc1/conv1d/ExpandDims
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Parsing fc1/weights[Op: Const].
[01/14/2020-11:20:23] [V] [TRT] UFFParser: fc1/weights -> [1,128,128]
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Applying order forwarding to: fc1/weights
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Parsing fc1/conv1d/ExpandDims_1[Op: ExpandDims]. Inputs: fc1/weights
[01/14/2020-11:20:23] [V] [TRT] UFFParser: fc1/conv1d/ExpandDims_1 -> [1,1,128,128]
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Applying order forwarding to: fc1/conv1d/ExpandDims_1
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Parsing fc1/conv1d/Conv2D[Op: Conv]. Inputs: fc1/conv1d/ExpandDims, fc1/conv1d/ExpandDims_1
[01/14/2020-11:20:23] [V] [TRT] UFFParser: Inserting transposes for fc1/conv1d/Conv2D
invalid unordered_map<K, T> key

No idea what’s going on. Could you please help?

Model pbtxt file: https://www.dropbox.com/s/byp6myesdauuomx/pointnet_model2_2020_2_6.pbtxt?dl=0

Model uff file: https://www.dropbox.com/s/6400tqew8io1gg8/pointnet_model2_2020_2_6.uff?dl=0