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)
| 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) |
no outgoing calls