PaddlePaddle/PaddleSeg

swin_Transformer设置参数ape=True后报错

KillerQueen-dust opened this issue · 0 comments

问题确认 Search before asking

Bug描述 Describe the Bug

报错信息:ValueError: (InvalidArgument) transpose(): argument (position 2) must be list or tuple, but got int (at ..\paddle\fluid\pybind\op_function_common.cc:438)

这行代码x = (x + absolute_pos_embed).flatten(2).transpose(1, 2) # B Wh*Ww C直接照抄的吧,paddle根本运行不起来

复现环境 Environment

  • PaddlePaddle: 2.9.0

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!