# Installed Flux has wrong types

**URL:** <https://discourse.julialang.org/t/installed-flux-has-wrong-types/32555>\
**Category:** New to Julia\
**Created:** [December 21, 2019, 2:35pm UTC](https://discourse.julialang.org/t/installed-flux-has-wrong-types/32555 "2019-12-21T14:35:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuxi.liu](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Post date:** [December 21, 2019, 2:35pm UTC](https://discourse.julialang.org/t/installed-flux-has-wrong-types/32555/1 "2019-12-21T14:35:57Z")

</div>

I installed Flux v0.10.0 and tried [the example](https://fluxml.ai/Flux.jl/stable/models/layers/#Flux.Dense)

```julia
> d = Dense(5, 2)
> d(rand(5))

```

and got

```julia
2-element Array{Float32,1}:
 -0.30700117
 -0.7389947

```

Instead of

```julia
Tracked 2-element Array{Float64,1}:
  0.00257447
  -0.00449443

```

Consequently, there is no gradient:

```julia
> d.W.grad
ERROR: type Array has no field grad

```

---

<div class="post-metadata">

**Author:** ![yuxi.liu](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Post date:** [December 21, 2019, 2:37pm UTC](https://discourse.julialang.org/t/installed-flux-has-wrong-types/32555/2 "2019-12-21T14:37:00Z")

</div>

Might be relevant: there is an error in the installation of Flux, probably because I’m using Windows:

```julia
julia> Pkg.build("Flux")
  Building ZipFile ─────────→ `C:\Users\DeadScholar\.julia\packages\ZipFile\oD4uG\deps\build.log`
  Building CodecZlib ───────→ `C:\Users\DeadScholar\.julia\packages\CodecZlib\5t9zO\deps\build.log`
  Building NNlib ───────────→ `C:\Users\DeadScholar\.julia\packages\NNlib\Nksco\deps\build.log`
┌ Error: Error building `NNlib`:
│ ┌ Warning: Your platform ("x86_64-w64-mingw32", parsed as "x86_64-w64-mingw32-gcc7-cxx11") is not supported by NNPACK!
│ │ You will only be able to use only the default NNlib backend.
│ └ @ Main C:\Users\DeadScholar\.julia\packages\NNlib\Nksco\deps\build.jl:30
│ ERROR: LoadError: MethodError: no method matching iterate(::Nothing)
│ Closest candidates are:
│ iterate(!Matched::Core.SimpleVector) at essentials.jl:600
│ iterate(!Matched::Core.SimpleVector, !Matched::Any) at essentials.jl:600
│ iterate(!Matched::ExponentialBackOff) at error.jl:218
│ ...
│ Stacktrace:
│ [1] top-level scope at C:\Users\DeadScholar\.julia\packages\NNlib\Nksco\deps\build.jl:38
│ [2] include at .\boot.jl:328 [inlined]
│ [3] include_relative(::Module, ::String) at .\loading.jl:1105
│ [4] include(::Module, ::String) at .\Base.jl:31
│ [5] include(::String) at .\client.jl:424
│ [6] top-level scope at none:5
│ in expression starting at C:\Users\DeadScholar\.julia\packages\NNlib\Nksco\deps\build.jl:36
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\backwards_compatible_isolation.jl:649
  Building FFTW ────────────→ `C:\Users\DeadScholar\.julia\packages\FFTW\qqcBj\deps\build.log`
  Building SpecialFunctions → `C:\Users\DeadScholar\.julia\packages\SpecialFunctions\ne2iw\deps\build.log`
false

```

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [December 22, 2019, 4:43am UTC](https://discourse.julialang.org/t/installed-flux-has-wrong-types/32555/3 "2019-12-22T04:43:43Z")

</div>

Version 0.10 of Flux uses the new AD Zygote.jl instead of trackers, so you will never see tracked arrays in new Flux.

Try `Flux.gradient(d,x)` instead.
