mlx.utils.tree_merge#
- tree_merge(tree_a, tree_b, merge_fn=None)#
Merge two Python trees in one containing the values of both. It can be thought of as a deep dict.update method.
- 参数:
tree_a (Any) -- The first Python tree.
tree_b (Any) -- The second Python tree.
merge_fn (callable, optional) -- A function to merge leaves.
- 返回:
The Python tree containing the values of both
tree_aandtree_b.