# Zygote.jl-compatible dictionary-like mutable data types

**URL:** https://discourse.julialang.org/t/zygote-jl-compatible-dictionary-like-mutable-data-types/73186
**Category:** New to Julia
**Tags:** zygote, mutable-structure, autodiff
**Created:** [December 16, 2021, 7:37am UTC](https://discourse.julialang.org/t/zygote-jl-compatible-dictionary-like-mutable-data-types/73186 "2021-12-16T07:37:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)
#### Post date: [December 16, 2021, 7:37am UTC](https://discourse.julialang.org/t/zygote-jl-compatible-dictionary-like-mutable-data-types/73186/1 "2021-12-16T07:37:01Z")

</div>

Hi,  
to stack data without specified length, I utilised dictionary for my tasks.  
However, I found that there are some issues using dictionary with Zygote for automatic differentiation (AD), e.g., [like this](https://github.com/FluxML/Zygote.jl/issues/725).

Is there any mutable data types for unspecified data length with key-value pairs, which are compatible with Zygote and convenient to use in Julia?

---

<div class="post-metadata">

### Author: ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)
#### Post date: [December 16, 2021, 4:11pm UTC](https://discourse.julialang.org/t/zygote-jl-compatible-dictionary-like-mutable-data-types/73186/2 "2021-12-16T16:11:55Z")

</div>

See [this](https://github.com/SciML/DiffEqFlux.jl/issues/660) to follow my strategy so far.
