Closed ice-tong closed 3 months ago
would you mind sharing the model that the input of this node is an initializer? I may consider keeping all tensor shapes as a List variable.
would you mind sharing the model that the input of this node is an initializer? I may consider keeping all tensor shapes as a List variable.
Hi @ThanatosShinji , thanks for your prompt reply!
I'm sorry I can't share this model with you. It is a BEVFormer model based on this repository, modified and exported: https://github.com/DerryHub/BEVFormer_tensorrt.
The following screenshot is an example of gridsample input with constants, hope it helps.
would you mind sharing the model that the input of this node is an initializer? I may consider keeping all tensor shapes as a List variable.
If you prefer to unify Tensor.shape as a list type, I can modify this PR.
Just convert self.numpy.shape
to list by modifying the following code. I'm not sure if this change will cause any other problems though.
would you mind sharing the model that the input of this node is an initializer? I may consider keeping all tensor shapes as a List variable.
If you prefer to unify Tensor.shape as a list type, I can modify this PR.
Just convert
self.numpy.shape
to list by modifying the following code. I'm not sure if this change will cause any other problems though.
Sure, please add the List conversion here.
Hi @ThanatosShinji, sorry for the late update. I just pushed a new commit to convert the shape to a list for the onnx.TensorProto
case. Please check it out and feel free to leave your comments!
Thanks @ice-tong !
Motivtion
The shape inference of GridSampleNode could be crash if the input is initializer.
The
intensors[1].shape
would be a tuple if it is a initializer tensor.Modification
shape_infer
.