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

请问可以将batchsize设置为大于1吗? #79

Open
pingyang97 opened this issue Nov 14, 2023 · 6 comments
Open

请问可以将batchsize设置为大于1吗? #79

pingyang97 opened this issue Nov 14, 2023 · 6 comments

Comments

@pingyang97
Copy link

如何设置呢?我将config文件中的samples_per_gpu参数修改后还是会报错

@weiyithu
Copy link
Owner

当时这套代码是在3090上跑的,只考虑了每张卡batchsize为1的情况,很抱歉暂不支持多batchsize

@pingyang97
Copy link
Author

pingyang97 commented Nov 20, 2023 via email

@weiyithu
Copy link
Owner

同学你改了samples_per_gpu后报什么错

@HuaiyuanXu
Copy link

同学你改了samples_per_gpu后报什么错

RuntimeError: stack expects each tensor to be equal size, but got [40086, 4] at entry 0 and [42776, 4] at entry 1

改了samples_per_gpu=2之后,两个张量在堆叠(stack)操作时的维度不一致。这里的张量指的gt_occ。

@pingyang97
Copy link
Author

gt_occ的尺寸不一致,放入同一个batch会报错

@weiyithu
Copy link
Owner

我猜测应该是dataloader那块出了问题,可以试试把这里 改成list的形式

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