Commit 01925fe2 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Adds python_grad_func argument to function.Defun.

This allows the gradient for a function to be specified the same way as tf.RegisterGradient (except at the graph scope, rather than global scope). This allows the gradient to be expanded directly in the graph, which in turn enables efficiencies (in memory and space) that do not depend on the graph optimizer (which requires configuration entirely separate from the model definition, and does not always kick in, e.g. when control flow ops are present).
Change: 128270792
parent f6e5f572
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment