-
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
I came across this use case when working on FluxPrune.jl. If I have an array of functions that operate on layers, then I can do map((f, m) -> f(m), fs, model) when model is iterable like Chain or Parallel. But this returns a vector of layers instead of the type of model. For Chain, I can just pass the output of map back into the constructor, but this isn't the case for Parallel.
Of course, I can special case fs::AbstractVector and model::Chain in my case, but it would be nice to have a more generic way to do this. Basically something like re from Functors.jl but for the output of iterate(model).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels