Last updated: 2023-03-16.
tf_quant_finance.math.jacobian#
Computes the jacobian of func wrt to x.
tf_quant_finance.math.jacobian(
func, x, unconnected_gradients=None, parallel_iterations=None,
experimental_use_pfor=True, name=None
)
Args:#
func: Python callable accepting oneTensorof shape ofxand returning aTensorof any shape. The function whose jacobian is to be computed.x: ATensorwith respect to which the gradient is to be computed.unconnected_gradients: An enumtf.UnconnectedGradientswhich specifies the gradient value returned when the given input tensors are unconnected. Default value:None, which maps totf.UnconnectedGradients.NONE.parallel_iterations: A knob to control how many iterations are dispatched in parallel. This knob can be used to control the total memory usage.experimental_use_pfor: If true, uses pfor for computing the Jacobian. Else uses a tf.while_loop.name: Pythonstrname prefixed to ops created by this function. Default value:None(i.e., ‘jacobian’).
Returns:#
A Tensor with the gradient of y wrt each of x.