SpaceToDepth supported in tensorRT?

I am trying to deploy a tensorflow model on a Jetson TX2 using tensorRT 3.0 RC.
When I use the Uffparser I get the error message:

ERROR: UFFParser: Validator error: model_1/lambda_1/SpaceToDepth: Unsupported operation _SpaceToDepth

I use the function tf.space_to_depth() in the tensorflow model, so I am wondering if it is supported by tensorRT, and if not, what is the best way to fix the problem?

Thanks!

Hi,

This is a non-supported TensorFlow operation.
Maybe you can try to implement it with tf.reshape:
https://stackoverflow.com/questions/44357970/how-to-implement-tf-space-to-depth-with-numpy

Thanks.

Ok, thank you.

The example you linked was using numpy, is that compatible with tensorflow or is there a way to do it with tf functions directly?

Hi,

TensorRT doesn’t support SpaceToDepth operation.
To replace with other TensorFlow operations, it’s recommended to ask on StackOverflow for the larger community.

Thanks.

Excuse me, if we replace SpaceToDepth or DepthToSpace with other tensorflow operations, I’m afraid there maybe some influence on speed and performance.Will these two operations in tensorflow be supported in tensorrt ?

Hi,

SpaceToDepth and DepthToSpace is not supported by TensorRT currently.
You can check the support matrix here:
[url]https://docs.nvidia.com/deeplearning/sdk/tensorrt-support-matrix/index.html#layers-matrix[/url]

Thanks.

Same question…Wondering if somebody can write a custom layer to support depth_to_space op.