Closed prbzrg closed 2 months ago
Can you link the code causing this? Looking at the types it seems to be caused by the change in custom layer types -- https://lux.csail.mit.edu/dev/introduction/updating_to_v1#Breaking-Changes-2 (point 2)
I think, the error comes from the fact that the fields are different for layers
and st
when AD applies. (in my case, Zygote
over Enzyme.Forward
)
@generated function applychain(
layers::NamedTuple{fields}, x, ps, st::NamedTuple{fields}) where {fields}
It works if AD is not involved?
The fields of layers and st
being different suggest an incorrect model construction or that the parameter / state structure was incorrectly manipulated.
I found the problem, I was calling with nn
but ps
and st
of container. New AbstractLuxContainerLayer
doesn't comply with it.
Error:
Code:
Environment: