Skip to content

Add Axon.stop_grad/2 - #677

Open
georgeguimaraes wants to merge 1 commit into
elixir-nx:mainfrom
georgeguimaraes:stop-grad-layer
Open

georgeguimaraes wants to merge 1 commit into
elixir-nx:mainfrom
georgeguimaraes:stop-grad-layer

Conversation

@georgeguimaraes

Copy link
Copy Markdown
Member

A layer that passes its input through and stops gradients from flowing back through it, the graph-level counterpart of Nx.Defn.Kernel.stop_grad/1. Useful when a component feeds two paths and should learn from one of them only: soothsayer's trend also scales its multiplicative seasonality and we detach it there with Axon.nx(&Nx.Defn.Kernel.stop_grad/1), which this replaces with a named layer.

@georgeguimaraes
georgeguimaraes force-pushed the stop-grad-layer branch 2 times, most recently from 0dc74c6 to 74df1ca Compare September 17, 2026 14:59
A layer that passes its input through unchanged and stops gradients
from flowing back through it, for sharing a component between two
paths while training it through one of them, or freezing a branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant