Commit ff49f7b1 authored by Akshay Agrawal's avatar Akshay Agrawal Committed by TensorFlower Gardener
Browse files

Internal API to optionally compile a template's function into a graph function.

(1) Adds a function `make_template_internal` that takes an optional keyword
argument `create_graph_function_` that controls whether or not `func_` is
compiled into and executed as a graph function.

(2) Exposes `make_template_internal` as `tfe.make_template`, so users may
write something like
`
compiled = tfe.make_template("my_op", func, create_graph_function_=True)
`
to obtain a templatized version of func that is executed as a graph
function.

(3) Simplifies the implementation of (Eager)Template's _call_func and __call__
methods in a minor way.

PiperOrigin-RevId: 182082866
parent 7ca56c3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment