Connecting PyMC3 to external code - help with understanding Theano custom Ops

Thank you so much! I am new to this way of thinking (and the terminology), so please bear with me: “forward” means the function itself, and “backward” is its gradient? At first I got confused and wondered if you meant the “upper” and “lower” assignments in the example, but I gather those are just details specific to that problem.

I should be able to implement this without too much rewriting! Thanks again!