optax.projections.projection_hyperplane#
- optax.projections.projection_hyperplane(x: Any, a: Any, b: jax.typing.ArrayLike) Any[source]#
Projection onto a hyperplane.
Projects a tree
xonto the hyperplane defined by a treeaand scalarb.\[\operatorname{argmin}_y \|x - y\|_2^2 \quad \text{subject to} \quad \langle a, y \rangle = b\]- Parameters:
x โ tree to project.
a โ tree defining hyperplane onto which to project. Must have the same structure as
x.b โ scalar defining hyperplane onto which to project.
- Returns:
tree with the same structure as
x.