onnx-tensorrt
onnx-tensorrt copied to clipboard
Assertion failed: axesInput.allValuesKnown() && "Axes input for unsqueeze operation should be a constant tensor."
when using onnx2trt to convert onnx model to trt engine, an error occurs :
Assertion failed: axesInput.allValuesKnown() && "Axes input for unsqueeze operation should be a constant tensor."
testing environment
tensorflow models converted to onnx model. 18.04.1-Ubuntu onnx-tensorrt 7.2.1 TensorRT-7.2.1.6
It seems that unseqeeze does not supported . In my tensorflow codes, tf.expand_dims(tensor, axis=1) is used.
so how to solve this issue?
tf.expand_dims(tensor, axis=1) suggests that the unsqueeze axis should be a constant 1.
What TF2ONNX version are you using? Are you able to share the model?
tf.expand_dims(tensor, axis=1)suggests that the unsqueeze axis should be a constant1.What TF2ONNX version are you using? Are you able to share the model? tf.expand_dims(tensor, axis=1) the axis is indeed constant 1 and related dependencies are below : tf2onnx 1.9.3 onnx 1.10.2 pypi_0 pypi onnx-simplifier 0.2.28 pypi_0 pypi onnxoptimizer 0.2.6 pypi_0 pypi onnxruntime 1.10.0 pypi_0 pypi