> It's ususally assumed that you calculated sigm(X) in the forward pass and you
> reuse that result here

Ah, the important of variable names... If the local variable had been
named 'sigm_X', that question probably would not have been raised because
the code would have been more easily readable.