What is the timeline for dilated convolution support in TensorRT (Python), or SpaceToBatchND / BatchToSpaceND?
My ResNet50-based TensorFlow model has SpaceToBatchND and BatchToSpaceND around its Conv2D nodes, like so: Screenshot from 2018 07 05 16 04 01 — ImgBB . But these are not supported by TensorRT (in Python, not sure about C++).
I would like to know when SpaceToBatchND / BatchToSpaceND, and/or dilated convolution, will be supported in the Python API. If this is expected soon, I won’t have to spend time (a lot) to implement a workaround: write Plugin nodes in C++, use GraphSurgeon to insert it, or replacing SpaceToBatchND and BatchToSpaceND do with a combination of Slice, Reshape, Padding, etc. (which is problematic since Slice is not currently supported either).
Please let me know about the timeline for this, and provide advice on which path to take. Thank you very much in advance.
I am also interested in knowing when dilated convolution will be supported in TensorRT on a Jetson TX2. My Mobilenetv2 variant uses dilated convolutions and currently this is the only issue that stops the model from being served via TensorRT.
“Python samples using the new API include parser samples for ResNet-50, …”
“The included resnet_v1_152, resnet_v1_50, lenet5, and vgg19 UFF files do not support FP16 mode.”
To me, it seems that version 5 RC should now support what I am looking for, because ResNet is mentioned in the release notes (which uses dilated convolution). Correct?
I’m using a model which applies 8 dilated convolutional layers prior to concatenation as it’s input layer, followed by a few typical convolutional layers.
Without TensorFlow’s SpaceToBatchND/BatchToSpaceND, TensorRT only optimizes a portion of the model’s layers, and although it still provides performance improvements, the performance is severely limited by the lack of these ops. Upon inspection, the Conv2D ops for the dilated convolutions compose ~98% of the inference runtime.
I saw that dilated convolutions should be supported by TensorRT 5. However, I still have issues with BatchToSpaceND . Did anyone manage to make it work?
To anyone having trouble converting tensorflow models with dilated convolutions, make sure you are using the correct dilated convolution implementation. Tensorflow has tf.nn.atrous_conv2d | TensorFlow v2.10.0 and tf.nn.conv2d | TensorFlow v2.10.0 The first one will wrap normal(non dilated) conv2d ops with space_to_batch and batch_to_space as a way of implementing the dilation. The second link is the op that can use the cudnn implementations for dilated convolutions and also makes for a graph that converts nicely with the uff parser. That being said, I’m still experiencing some issues on tx2 with dilated convolutions. Even more strange, the same frozen tensorflow graph converted/running on my 1080ti works perfectly…