Zygote: Mutating arrays is not supported (small example)

You could replace y[y.<0] .= 0.0 by y = clamp.(y, 0.0, Inf).
See here for workarounds when it is more difficult to write code without mutating arrays.