concept turn in category python
appears as: turn

This is an excerpt from Manning's book Math for Programmers: 3D graphics, machine learning, and simulations with Python.
Solution: The return value should be a new function that, in turn, produces a new function when called:
Estimating so many partial derivatives would be computationally expensive because each would require evaluating C twice to test the effect of tweaking one of its input variables. In turn, evaluating C requires looking at every image in the training set and passing it through the network. It might be possible to do this, but the computation time would be prohibitively long for most real-world problems like ours.