tf_agents.utils.nest_utils.unstack_nested_arrays_into_flat_items
Stay organized with collections
Save and categorize content based on your preferences.
Unstack/unbatch a nest of numpy arrays into flat items.
tf_agents.utils.nest_utils.unstack_nested_arrays_into_flat_items(
nested_array
)
Rebuild the nested structure of the unbatched elements is expensive. On the
other hand it is sometimes unnecessary (e.g. if the downstream processing
requires flattened structure, e.g. some replay buffer writers which flattens
the items anyway).
Args |
nested_array
|
Nest of numpy arrays where each array has shape [batch_size,
...].
|
Returns |
A list of length batch_size where each item in the list is the flattened
version of the corresponding item of the input.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]