warp icon indicating copy to clipboard operation
warp copied to clipboard

Fix the error when there are variables in a struct with .grad=None

Open PingchuanMa opened this issue 2 years ago • 0 comments

When a variable in a struct has .grad=None, it complains about the NoneType when assigning it to the struct. Bug fixed by replacing the grad with a same-dtype same-device same-shape zero array.

PingchuanMa avatar Oct 26 '22 17:10 PingchuanMa