# VAE in Flux model zoo

**URL:** https://discourse.julialang.org/t/vae-in-flux-model-zoo/33747
**Category:** Machine Learning
**Tags:** flux
**Created:** [January 24, 2020, 2:10pm UTC](https://discourse.julialang.org/t/vae-in-flux-model-zoo/33747 "2020-01-24T14:10:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rsteckel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rsteckel](https://discourse.julialang.org/u/rsteckel)
#### Post date: [January 24, 2020, 2:10pm UTC](https://discourse.julialang.org/t/vae-in-flux-model-zoo/33747/1 "2020-01-24T14:10:44Z")

</div>

I’ve been unable to get the MNIST VAE example in Flux’s model zoo to train.

During epoch 1 of training, I get this error:

```julia
[ Info: Epoch 1
ERROR: Mutating arrays is not supported
Stacktrace:
 [1] (::Zygote.var"#1003#1004")(::Nothing) at /Users/rs990e/.julia/packages/Zygote/oMScO/src/lib/array.jl:53
 [2] (::Zygote.var"#2668#back#1005"{Zygote.var"#1003#1004"})(::Nothing) at /Users/rs990e/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:49
 [3] push! at /Users/rs990e/.julia/packages/Zygote/oMScO/src/compiler/interface.jl:65 [inlined]
 [4] (::typeof(∂(push!)))(::Nothing) at /Users/rs990e/.julia/packages/Zygote/oMScO/src/compiler/interface2.jl:0
 [5] params! at /Users/rs990e/.julia/packages/Flux/2i5P1/src/functor.jl:42 [inlined]

```

Could it be something I’m doing wrong?

Using Julia 1.3.1 and Flux 0.10.1
