Examples for traverse_util module
See original GitHub issueFirst off, loving the new linen api 🎉!!!
The traverse_util
module looks useful for manipulating parameters/state, but I could not figure out how to use it effectively (apart from unflatten_dict
and flatten_dict
, which are both extremely useful). The simple examples in the docs make sense, but it’d be nice to see how to use this in a real setting. Perhaps the power of this module can be illustrated in a transfer learning example, where you need to manipulate subsets of parameters?
The module seems similar to Haiku’s data_structures
module, but the API seems more complex.
Also, it’s unfortunate that Flax has jax_utils
(plural) and traverse_util
(singular). Is it too late to pluralize traverse_util
for consistency?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
flax.traverse_util package - Read the Docs
flax.traverse_util package#. A utility for traversing immutable datastructures. A Traversal can be used to iterate and update complex data structures.
Read more >Top 5 @babel/traverse Code Examples - Snyk
To help you get started, we've selected a few @babel/traverse examples, based on popular ways it is used in public projects.
Read more >A dive into the Node.js 'Util' module | Three Five Two | Medium
util.debuglog provides a simple logging function that is explicitly enabled using the NODE_DEBUG environment variable. Here's a quick example…
Read more >traverse JavaScript and Node.js code examples - Tabnine
Best JavaScript code snippets using traverse(Showing top 15 results out of 1,179) · utils/obfuscate.js/withKeepStartCount · configloader.js/traverse. · benchmark/ ...
Read more >JavaScript general utility module example
1.11 - traverse an object ... On top of deep cloning another useful object method to have is something that can be used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, but maybe we should create a new one for removing the traverse_util API. Since you started this issue as well, do you want to do that?
Got it, I agree that it makes sense to remove this API altogether. I think the equivalent tree_map code is easier to understand as well. In this case, should I close this issue?