未验证 提交 572719c6 编写于 作者: A Aurelius84 提交者: GitHub

[Dy2St]Fix cascade_rcnn export model problem (#6468)

* [Dy2St]Fix cascade_rcnn export model problem

* [Dy2St]Fix cascade_rcnn export model problem
上级 7018a080
......@@ -300,6 +300,12 @@ class CascadeHead(BBoxHead):
num_prop = []
for p in proposals:
num_prop.append(p.shape[0])
# NOTE(dev): num_prob will be tagged as LoDTensorArray because it
# depends on batch_size under @to_static. However the argument
# num_or_sections in paddle.split does not support LoDTensorArray,
# so we use [-1] to replace it and whitout lossing correctness.
num_prop = [-1] if len(num_prop) == 1 else num_prop
return pred_bbox.split(num_prop)
def get_prediction(self, head_out_list):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册