-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于swin_transformer测试部分的报错解决 #34
Comments
在测试部分会产生如下错误: 我查看参数之后发现是attn部分受到mask的影响数据类型从float16变成了float32,我个人的解决办法是 |
@Codingtnl 按照默认脚本测试会采用半精度我估计哈swin 实现上半精度可能有问题,关掉后就没问题了。按照你的方法把他们强制转换成同样类型也可以。 |
对了想问一下如果我要加载官方的swin预训练模型我该怎么做比较好呢,自己训swin收敛的有点慢 |
@Codingtnl 我参照的原始仓库里有加载权重的代码,但我没试过呢,不知道直接加上会不会报错 |
想问老哥有办法加载预训练模型了吗? |
Thanks @yl305237731 let me try to change with x = (attn.type_as(v) @ v).transpose(1, 2).reshape(B_, N, C) |
请问能加载了吗 |
add pretrained:True in backbone of model_swin.yaml |
No description provided.
The text was updated successfully, but these errors were encountered: