axon
axon copied to clipboard
Unwrap containers by default in Axon custom layers
We should consider unwrapping containers by default in Axon custom layers. So for example if you have a custom layer:
defn custom_layer(foo, bar, _opts) do
{foo, bar}
end
You can just pattern match on the output and get regular Axon structs:
{foo_axon, bar_axon} = Axon.layer(&custom_layer/3, [foo, bar])