warp
warp copied to clipboard
Fix the error when there are variables in a struct with .grad=None
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.