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

为什么数据经过DataLoader后变短了 #81

Open
wulalahalala opened this issue Apr 8, 2022 · 1 comment
Open

为什么数据经过DataLoader后变短了 #81

wulalahalala opened this issue Apr 8, 2022 · 1 comment

Comments

@wulalahalala
Copy link

样本的长度为128,经过DataLoader后就变成了27,请问这个是什么原因呢?

@wuboyu88
Copy link

样本的长度为128,经过DataLoader后就变成了27,请问这个是什么原因呢?

是因为不同的batch对应的sequence长度可以不一样,而同一个batch对应的sequence长度是根据该batch中最长sequence的长度进行padding的

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

2 participants