Any way to print shapes during parsing?

I’m trying to debug the parsing of a model in UFF format, is there any way to print the shapes?
The parser give an error where it tells me the input dimensions of a concatenation operation don’t match, I would like to know what it thinks the dimensions are.

for those wondering, you can do something like this

INetworkDefinition* networkDefinition;
// create network and try to parse, doesn't matter if it fails
// ...

for (int layer_idx = 0; layer_idx < networkDefinition.getNbLayers(); ++layer_idx)
{
        nvinfer1::ILayer* layer = networkDefinition.getLayer(layer_idx);
	for (int input_idx = 0; input_idx < layer->getNbInputs(); ++input_idx)
	{
		nvinfer1::ITensor* tensor = layer->getInput(input_idx);
		nvinfer1::Dims dims = tensor->getDimensions();
		for (int d_idx = 0; d_idx < dims.nbDims; ++d_idx)
		{
                    // get the size of dimension d_idx on input input_idx for layer layer_idx
                    int size = dims.d[d_idx]
                }
	}
}