-
-
Notifications
You must be signed in to change notification settings - Fork 615
Open
Labels
Description
Flux.params does not work for primitive types, e.g.
I assume this is because Zygote uses the pointer to the arrays to identify the array and differentiate with regard to every usage of that pointer. Primitive types do not have a pointer stored in the struct but the element itself so this method breaks.
Ideally Primitive types are supported (the pointer is the pointer to the model struct + offset)
But it might be more realistic to use the output of Flux.functor(model) to print a warning about any primitive (or otherwise incompatible) types when Flux.params is used.
