计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
flax-interop【效率与协作】Use Haiku's optional experimental Flax interop APIs to embed Haiku modules in Flax or lift Flax modules inside Haiku.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task specifically mixes Haiku with Flax and needs haiku.experimental.flax behavior. Treat the APIs here as optional, experimental interop helpers: they are useful for preserving existing Haiku code inside a Flax program, or for calling a Flax linen.Module inside a Haiku transform.
hk.experimental.flax.Module(transformed) for an hk.transform/hk.transform_with_state result, or hk.experimental.flax.Module.create(hk.ModuleClass, *args, **kwargs) for a Haiku module class.hk.experimental.flax.lift(flax_module, name="...") inside an outer hk.transform or hk.transform_with_state function.hk.experimental.flax.flatten_flax_to_haiku(collection) on one Flax collection such as variables["params"], not on the whole variables dictionary.flax imports fail, variable trees look surprising, state does not update, RNG streams fail, or versions are incompatible.Module.create(hk.Linear, ...) init/apply smoke path on synthetic data.python scripts/haiku_flax_smoke.py --mode module-create.variables.keys() after mod.init(...); expect Flax collections such as "params" and, for stateful Haiku, "state".params and state returned by init; lifted Flax params appear under the explicit name, and non-param Flax collections become Haiku state prefixes.