Questions importing a tensorflow model

Hi!

I have successfully converted a tensorflow model to uff.

In the model I use a tf.bool placeholder. How do I call parser->registerInput on this placeholder?
I also use tf.layer.batch_normalisation layers. This should work should’t it? Has somebody done this successfully?

I get a ‘parsing failed’ error…

Thanks in advance,

Roos

Hello,

You’d do something like this:

with builder = trt.Builder(TRT_LOGGER) as builder, builder.create_network() as network, trt.UffParser() as parser:
    	parser.register_input("Placeholder", (1, 28, 28))
    	parser.register_output("fc2/Relu")
parser.parse(model_file, network)

Regarding tf.layer.batch_normalisation, please reference support matrix regarding latest supported layers and operations: https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#support_op

Hi,

Thank you for your reaction. I’m not looking for register_input on an image, that is in the samples and documentation. I want to know how to do this for a single boolean. FusedBatchnorm is supported according to the documentation. But the batchnorm requires a boolean whether to train or not.

Regards,

Roos