pymc.SymbolicRandomVariable.pushforward#

SymbolicRandomVariable.pushforward(inputs, outputs, eval_points)#

Construct a graph for the Jacobian-vector product (pushforward).

Given a function \(f\) implemented by this Op with inputs \(x\) and outputs \(y = f(x)\), the pushforward computes \(\dot{y} = J \dot{x}\) where \(J\) is the Jacobian \(\frac{\partial f}{\partial x}\) and \(\dot{x}\) are the tangent vectors.

This is the core method for forward-mode automatic differentiation.

If an output is not differentiable with respect to any input, return a variable of type DisconnectedType for that output. Unlike the legacy R_op method, pushforward must never use None to indicate disconnected outputs.

Parameters:
inputsSequence[Variable]

The input variables of the Apply node using this Op.

outputsSequence[Variable]

The output variables of the Apply node using this Op.

tangentsSequence[Variable]

The tangent vectors. One per input. A variable of DisconnectedType indicates that the corresponding input is not being differentiated.

Returns:
output_tangentslist of Variable

The tangent vectors w.r.t. each output. One Variable per output.