TensorRT Input concatenation example

I have a tensorflow network that accepts two input images and concatenates them along channel dimension, but TensorRT UFF parser is having issues parsing that network (described the error here: https://devtalk.nvidia.com/default/topic/1036940/jetson-tx2/uff-parser-errors/).

I tried modifying a sample tesnorflow digit detection network to add concatenation layer at the input (which was working with TensorRT before), and got the same error, so I suspect I might be missing some steps required to get concatenation to work. Does anyone have an example of a network with concatenation layer that works with TensorRT?

Hi,

Here is a sample for concat op:

import tensorflow as tf
import uff
import tensorrt as trt
from tensorrt.parsers import uffparser

MAX_WORKSPACE = 1 << 20
MAX_BATCHSIZE = 1
G_LOGGER = trt.infer.ConsoleLogger(trt.infer.LogSeverity.INFO)

sess = tf.Session()
image1 = tf.placeholder(dtype=tf.float32, shape=[1,28,28,3], name='image1')
image2 = tf.placeholder(dtype=tf.float32, shape=[1,28,28,3], name='image2')
output = tf.concat([image1, image2], 3, name='output')

print output

uff_model = uff.from_tensorflow(sess.graph_def, ['output'])

parser = uffparser.create_uff_parser()
parser.register_input('image1', (3,28,28), 0)
parser.register_input('image2', (3,28,28), 1)
parser.register_output('output')

engine = trt.utils.uff_to_trt_engine(G_LOGGER, uff_model, parser, MAX_BATCHSIZE, MAX_WORKSPACE, trt.infer.DataType.FLOAT)
print 'TensorRT output shape=(%d, %d, %d)' % (engine.get_binding_dimensions(2).to_DimsCHW().H(), engine.get_binding_dimensions(2).to_DimsCHW().W(), engine.get_binding_dimensions(2).to_DimsCHW().C())

From the log shared in topic 1036940, error comes from certain scale layer.
Let track the error on that topic directly.
https://devtalk.nvidia.com/default/topic/1036940/jetson-tx2/uff-parser-errors

Thanks