A Struct, possibly recursively nested, or a non-Struct element
that can be packed with tf.nest.flatten. If struct has
non-Struct-typed fields which should be flattened further, they should
not contain inner Structs, as these will not be flattened (e.g.
Struct([('a', collections.OrderedDict(b=Struct([('c', 5)])))]) would not
be valid).
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.structure.flatten\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\nReturns a list of values in a possibly recursively nested `Struct`. \n\n tff.structure.flatten(\n struct: object\n ) -\u003e list[object]\n\n| **Note:** _This implementation is not compatible with the approach of [`tf.nest.flatten`](https://www.tensorflow.org/api_docs/python/tf/nest/flatten), which enforces lexical order for `collections.OrderedDict`s.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `struct` | A `Struct`, possibly recursively nested, or a non-`Struct` element that can be packed with [`tf.nest.flatten`](https://www.tensorflow.org/api_docs/python/tf/nest/flatten). If `struct` has non-`Struct`-typed fields which should be flattened further, they should not contain inner `Structs`, as these will not be flattened (e.g. `Struct([('a', collections.OrderedDict(b=Struct([('c', 5)])))])` would not be valid). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The list of leaf values in the `Struct`. ||\n\n\u003cbr /\u003e"]]