Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

wrong error in getting-started.py #16

Open
feifeibear opened this issue Dec 6, 2021 · 2 comments
Open

wrong error in getting-started.py #16

feifeibear opened this issue Dec 6, 2021 · 2 comments

Comments

@feifeibear
Copy link

feifeibear commented Dec 6, 2021

Hello,
I noticed you fix the lazy label bug and the getting-started.py is able to run.
But it can not pass the assertion. The grad diff is quite large!

assert all(
[print(torch.max(grad - lazy_grad)) for (grad, lazy_grad) in zip(grads, lazy_grads)]
)

tensor(0.0698)
tensor(0.0227)
tensor(0.0717)
tensor(0.0415)
tensor(0.5402)
tensor(0.7869)

@feifeibear
Copy link
Author

BTW: on my machine, the batch as 9 is split as two minibatches [0:8] [8:9]

@rentruewang
Copy link
Owner

rentruewang commented Dec 6, 2021

Hmm, that's quite weird. I'll look into it. I believe it may have something to do with mean/sum scaling. Appreciate the bug report!

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

No branches or pull requests

2 participants