dlsyscourse / hw2

5 stars 16 forks source link

A question about test_optim_adam_z_memory_check_1 #17

Open hkr04 opened 1 week ago

hkr04 commented 1 week ago

With my implementation and an old version from others, I got this assertion error: image But if I print one of the m, v, grad,it will pass (for both my implementation and another one): image Note that I only transform the m and v to ndl.Tensor for once and use the .data in calculation, and I can pass the previous test_optim_sgd_z_memory_check_1.

Could anyone explain this? I'm quite confused why this would influence the count of tensors. Thanks for help :)