Updating only a subset of parameters in a neural network using Flux

Just multiplying the output of the actor with a boolean mask is not an option?

pol(x) .* (1:4 .∈ Ref(pos_a))