optax.tree_utils.tree_real

Contents

optax.tree_utils.tree_real#

optax.tree_utils.tree_real(tree: Any) Any[source]#

Compute the real part of a pytree.

Parameters:

tree โ€“ pytree.

Returns:

a pytree with the same structure as tree.