Parsing Uff file works TensorRT and not in TensorRT 5.0


I modified the sampleUffMNIST example from TensorRT to work with an Uff file which I created from a frozen tensorflow graph. In TensorRT this works perfectly.

In TensorRT 5.0 I get 2 problems:

In TensorRT version I can use the following for registering the Input:

parser->registerInput("image", Dims3(480, 640, 3), nvuffparser::UffInputOrder::kNHWC);

With TensorRT 5.0 I get:

ERROR: [...]: kernel weights has count 1728 but 276480 was expected

which can be explained by registerInput expecting the number of channels as first dimension. I can’t find any remark in the release notes that the order of the dimensions changing between 5.0 and

No matter if I use:

parser->registerInput("image", Dims3(3, 640, 480), nvuffparser::UffInputOrder::kNHWC);
parser->registerInput("image", Dims3(3, 640, 480), nvuffparser::UffInputOrder::kNCHW);
parser->registerInput("image", Dims3(3, 480, 640), nvuffparser::UffInputOrder::kNHWC);
parser->registerInput("image", Dims3(3, 480, 640), nvuffparser::UffInputOrder::kNCHW);

in Version 5.0 the net detects nothing

Do I need to change my input in a way that it fits TensorRT 5.0?