View source on GitHub |
Returns struct
as an collections.OrderedDict
, if possible.
tff.structure.to_odict(
struct: Struct[_T], recursive: bool = False
) -> collections.OrderedDict[str, _T]
Args | |
---|---|
struct
|
An Struct .
|
recursive
|
Whether to convert nested Struct s recursively.
|
Raises | |
---|---|
ValueError
|
If the Struct contains unnamed elements.
|