Google I/O is a wrap! Catch up on TensorFlow sessions View sessions

tff.framework.ReconstructOnChangeExecutorFactory

ExecutorFactory exposing hook to construct executors on environment change.

Inherits From: ExecutorFactory

When the initialization parameter change_query returns True, ReconstructOnChangeExecutorFactory` constructs a new executor, bypassing any previously constructed executors.

Methods

clean_up_executors

View source

Releases any resources held by the factory.

Note that calling this method may invalidate the state of any executors which have previously been returned by the factory; create_executor should be called again if a new executor which is safe to use is desired.

create_executor

View source

Returns a new or existing executor, depending on change_query.

create_executor constructs a new executor whenever change_query returns True when called with argument cardinalities. If change_query returns False, create_executor is free to inspect its internal executor cache and return a previously constructed executor if one is available.

Args
cardinalities A mapping from placement literals to ints.

Returns
An executor_base.Executor obeying the semantics above.