Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tff.framework.get_map_of_unbound_references

View source on GitHub

Gets a Python dict of the unbound references in comp.

tff.framework.get_map_of_unbound_references(
    comp
)

Compuations that are equal will have the same collections of unbounded references, so it is safe to use comp as the key for this dict even though a given compuation may appear in many positions in the AST.

Args:

  • comp: The computation building block to parse.

Returns:

A Python dict of elements where keys are the compuations in comp and values are a Python set of the names of the unbound references in the subtree of that compuation.