Skip to content
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

训练出现警告 #113

Open
zhang11231 opened this issue Mar 5, 2024 · 3 comments
Open

训练出现警告 #113

zhang11231 opened this issue Mar 5, 2024 · 3 comments

Comments

@zhang11231
Copy link

作者你好,我使用你的vitb_256_mae_ce_32x4_got10k_ep100.yaml模型训练got10k,我的配置是单卡3090,训练过程中报出警告,UserWarning: An output with one or more elements was resized since it had shape [6291456], which does not match the required output shape [1, 32, 3, 256, 256]. This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at ../aten/src/ATen/native/Resize.cpp:17.) return torch.stack(batch, 1, out=out);同样的数据我用vitb_256_mae_32x4_ep300.yaml,屏蔽其他几个数据集,只使用got10k,可以正常训练,作者这两个数据集有什么差别吗,- GOT10K_train_full和 - GOT10K_vottrain的区别吗

@obliviate1230
Copy link

你好,我也遇到了相同的问题,我的配置是单卡4090。我发现当我把num_workers设置为0的时候,这个warning就不见了,只要不是0就会出现

@zhang11231
Copy link
Author

这个问题,我解决了,把torch.stack这个里面的out=out删除就没有警告了,我看其他人说这个问题的解决办法是把torch的版本降低一点就不会报这个错误

@AngYang-YA
Copy link

这个问题,我解决了,把torch.stack这个里面的out=out删除就没有警告了,我看其他人说这个问题的解决办法是把torch的版本降低一点就不会报这个错误

你好,我想问你一些问题,请问可以加一下联系方式吗?这是我的qq:573686178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants