未验证 提交 32ea0434 编写于 作者: T Tingquan Gao 提交者: GitHub

concat -> stack (#8423)

adapt to paddle upgrade that concat dont support 0D tensor
上级 eebefecb
......@@ -361,7 +361,7 @@ class DINOTransformer(nn.Layer):
valid_ratios = []
for i, feat in enumerate(proj_feats):
bs, _, h, w = paddle.shape(feat)
spatial_shapes.append(paddle.concat([h, w]))
spatial_shapes.append(paddle.stack([h, w]))
# [b,c,h,w] -> [b,h*w,c]
feat_flatten.append(feat.flatten(2).transpose([0, 2, 1]))
if pad_mask is not None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册