Thanks for the explanations, but if I don’t fill other variable.grad.data to 0, will the grad of parameters that depended on those variables be wrongly estimated?  Keeping tracking of all the variables and setting their grad to 0 properly seems quite error prone.