Applies a tensor-in-tensor-out function with variables to some Tensor
s.
tft.apply_function_with_checkpoint(
fn, inputs, checkpoint, include=None, exclude=None
)
Variable values are loaded from the given checkpoint path. Note that the
input_tensor_func, together with the checkpoint, will be converted to an
all-constants graph, so ops requiring graph collections, such as table lookup
(which requires a table init op being added to TABLE_INITIALIZERS collection),
are not supported.
Args |
fn
|
A tensor-in-tensor-out function that may contain variables.
|
inputs
|
A list of Tensor s to apply fn to.
|
checkpoint
|
The checkpoint path to load variables from.
|
include
|
An optional list/tuple of scope strings for filtering which
variables from the VARIABLES collection to include. If None, all
variables will be included.
|
exclude
|
An optional list/tuple of scope strings for filtering which
variables from the VARIABLES collection to exclude. If None, no
variables will be excluded.
|
Returns |
A Tensor or list of Tensor s representing the application of fn .
|
Raises |
ValueError
|
if the input tensor-in-tensor-out function adds to
TABLE_INITIALIZERS collections.
|