Zygote.gradient(): Mutating arrays is not supported

Probably, you try to differentiate through some code that contains something like x[i] = y.
This is not supported by Zygote. I used this work-around at some point.

To get more help, please follow the recommendations in Please read: make it easier to help you.

1 Like