I’m going through this tutorial 3.
In Warm-up: numpy section the derivative of loss function with respect to h is being calculated as follows:
    grad_h = grad_h_relu.copy()
    grad_h[h < 0] = 0

But according to chain rule, should not we do something like the following?

'''
Derivative of loss function wrt h = derivative of loss function wrt h_relu * 
                                    derivative of h_relu wrt h
'''
def reluGrad(x):
    grad = x.copy()
    grad[x > 0] = 1
    return grad
 
grad_h_relu_wrt_h = reluGrad(h_relu)
grad_h = grad_h_relu.dot(grad_h_relu_wrt_h.T)

I know something is fishy here because the dimensions of grad_h in the LHS, which must be equal to the dimensions of h, is not going to match with the dimensions of grad_h_relu.dot(grad_h_relu_wrt_h.T) in the RHS (since grad_h_relu and grad_h_relu_wrt_h are of same dimensions we are always going to end up with a square matrix in the RHS) but I am unable to figure out why this is wrong and how the calculation mentioned in the tutorial will lead to correct gradient calculation.
Did I misunderstand the tutorial code?
Could someone please explain this?