MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / jvp

Method jvp

tensorflow/python/eager/forwardprop.py:192–211  ·  view source on GitHub ↗

Fetches the Jacobian-vector product computed for `target`. Note that this function performs no computation, and simply looks up a JVP that was already computed (unlike backprop using a `tf.GradientTape`, where the computation happens on the call to `tape.gradient`). Args:

(self, target)

Source from the content-addressed store, hash-verified

190 pywrap_tensorflow.TFE_Py_ForwardAccumulatorWatch(self._accumulator, t, g)
191
192 def jvp(self, target):
193 """Fetches the Jacobian-vector product computed for `target`.
194
195 Note that this function performs no computation, and simply looks up a
196 JVP that was already computed (unlike backprop using a
197 `tf.GradientTape`, where the computation happens on the call to
198 `tape.gradient`).
199
200 Args:
201 target: A watched Tensor or structure of Tensors to fetch the JVPs for.
202
203 Returns:
204 Tensors with the same shapes and dtypes as `target`, or None if no JVP
205 is available.
206 """
207 if self._accumulator is None:
208 raise ValueError("Called jvp() without first tracing anything.")
209 return nest.map_structure(
210 functools.partial(pywrap_tensorflow.TFE_Py_ForwardAccumulatorJVP,
211 self._accumulator), target)

Callers 10

funcMethod · 0.80
compiled_functionMethod · 0.80
_jvpFunction · 0.80
_compute_forwardgradMethod · 0.80
testGradPureForwardMethod · 0.80
take_gradientsMethod · 0.80

Calls

no outgoing calls

Tested by 10

funcMethod · 0.64
compiled_functionMethod · 0.64
_jvpFunction · 0.64
_compute_forwardgradMethod · 0.64
testGradPureForwardMethod · 0.64
take_gradientsMethod · 0.64