Thank you. I’m afraid I now get a new error:
ERROR: Mutating arrays is not supported -- called setindex!(Vector{Real}, ...)
This error occurs when you ask Zygote to differentiate operations that change
the elements of arrays in place (e.g. setting values with x .= ...)