View source on GitHub |
A tff.program.ReleaseManager
that releases values to TensorBoard.
Inherits From: ReleaseManager
tff.program.TensorBoardReleaseManager(
summary_dir: Union[str, os.PathLike[str]]
)
A tff.program.TensorBoardReleaseManager
is a utility for releasing values
from a federated program to TensorBoard and is used to release values from
platform storage to customer storage in a federated program.
Values are released as summary data using tf.summary
. When the value is
released, if the value is a value reference or a structure containing value
references, each value reference is materialized. The value is then flattened
and released as summary data. The structure of the value is used as the name
of the summary data. Scalar values are released using tf.summary.scalar
and
non-scalar values are released using tf.summary.histogram
.
See https://www.tensorflow.org/api_docs/python/tf/summary for more information about summary data and how to visualize summary data using TensorBoard.
Args | |
---|---|
summary_dir
|
A path on the file system to save release values. If this path does not exist it will be created. |
Raises | |
---|---|
ValueError
|
If summary_dir is an empty string.
|
Methods
release
release(
value: tff.program.ReleasableStructure
,
key
) -> value_reference.MaterializedValue
Releases value
from a federated program.
Args | |
---|---|
value
|
A tff.program.ReleasableStructure to release.
|
key
|
A integer used to reference the released value ; key represents a
step in a federated program.
|