layers not supported when convert tensorflow model to UFF model

I try to convert tensorflow freeze model to UFF model using uff.from_tensorflow(). But some layers seems not supported such as the identity and merge. So what should I do to finish the convert. If the plugin api support on python? And are there some sample code addressing this issue?

Thanks.

Hi,

Plugin API isn’t available for TensorFlow/UFF users.

Here are two possible WAR:
1. Use other operations.
Ex.

# WAR for tf.identity 
identity = tf.constant(np.identity(DIM, np.float32))
out = tf.matmul(in, identity)

2. Switch to Caffe framework.
You can set custom implementation via Plugin API in the Caffe-based interface.
Native sample:
/usr/src/tensorrt/samples/samplePlugin/samplePlugin.cpp
/usr/src/tensorrt/samples/sampleCharRNN/sampleCharRNN.cpp
/usr/src/tensorrt/samples/sampleFasterRCNN/sampleFasterRCNN.cpp
TX2 sample:
https://github.com/AastaNV/Face-Recognition

Thanks.