Axis conversion "off by one" in UFF conversion of tf.gather

Software version: TensorRT 5.0.4 or TensorRT 5.1.2rc (same behavior on both)

Problem summary: Axis parameter conversion is “off by one” in UFF conversion of tf.gather from Tensorflow (uff.from_tensorflow_frozen_model)

  1. according to TensorRT docuementation of the IGatherLayer, “the parameter axis is zero-indexed and starts at the first non-batch dimension of data tensor”
  2. however for the Tensorflow function tf.gather, the axis parameter starts with the first dimension (including batch)
  3. thus the UFF converter should subtract 1 from the provided axis parameter when setting the axis parameter of the IGatherLayer. However it does not.
  4. I have confirmed this because running the UFF converter and executing in TensorRT the following does not generate the correct results:
    data = tf.zeros([10, 2, 5])
    g1 = tf.gather(data, 0, axis=1)
    however decrementing the axis and running under TensorRT then generates the correct result
    g1 = tf.gather(data, 0, axis=0)
    even though according to (1) above, TensorRT is not capable of gathering over the batch dimension (thus the converter should have reported an error because I used axis=0 above)


we are triaging and will keep you updated.

I wondered if the triaging has produced any conclusions regarding this issue, and its possible resolution to allow use of the Gather operator from Tensorflow networks? Thank you in advance.

Could you please provide an update of the result of triaging this issue? Is there any workaround, or will it be fixed in a subsequent release? Thank you.

This issue (an apparent bug in the released version of TensorRT) was posted more than 5 weeks ago. It would be appreciated if you could provide an update on the triaging and resolution. Thank you.