[Solved]Gradient ignores constant

Hi there, I am a PyTorch novice and just start reading the ‘60 mins tutorial’. The example of autograd confused me:

As in the tutorial, o=1/4*sum(zi), zi=3(xi+2)^2, and the gradient of o on xi is 3/2(xi+2).

My problem is why the 1/4 before summation disappears?

I think the constant 1/4 is not ignored. Otherwise, the gradient should be 6(xi + 2).

Thanks! I made a stupid mistake…