Hello, I was wondering if the gradient_output in the BRDF example perhaps needs a zero_() in the learning inner loop (ie. before calling m.brdf_loss.bwd) ? Similar to calling optimizer.zero_grad() in PyTorch.
Otherwise, wouldn't the code accumulate the gradient with each sample, while also immediately applying it?
Apologies if this is intentional, or a zero-fill is already implied somewhere, or I misunderstood :)
Thanks!
bert
PS Sorry, I don't have Jupyter set up to test a merge request.
Hello, I was wondering if the
gradient_output
in the BRDF example perhaps needs azero_()
in the learning inner loop (ie. before callingm.brdf_loss.bwd
) ? Similar to callingoptimizer.zero_grad()
in PyTorch.Otherwise, wouldn't the code accumulate the gradient with each sample, while also immediately applying it?
Apologies if this is intentional, or a zero-fill is already implied somewhere, or I misunderstood :)
Thanks! bert
PS Sorry, I don't have Jupyter set up to test a merge request.