koila icon indicating copy to clipboard operation
koila copied to clipboard

wrong error in getting-started.py

Open feifeibear opened this issue 2 years ago • 2 comments

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 avatar Dec 06 '21 07:12 feifeibear

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

feifeibear avatar Dec 06 '21 08:12 feifeibear

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!

rentruewang avatar Dec 06 '21 10:12 rentruewang