Fix unnecessary loop in applyLinearGrad()
Merge remote-tracking branch 'watagashi/applyLinearGrad'