Interactive online version: Open In Colab

Operators

There are a few operators that help to clean up the implementation.

Text

Operator

mod, z = pax.purecall(mod, x, y)

mod, z = mod % (x, y)

mod.parameters()

~mod

pax.update_pytree(mod1, mod2)

mod1 | mod2

mod1.update_parameters(mod2)

mod1 | ~mod2

f = pax.Sequential(mod1, mod2)

f = pax.Sequential() >> mod1 >> mod2