# Flux.Dense() =\> format not accepted

**URL:** <https://discourse.julialang.org/t/flux-dense-format-not-accepted/86553>\
**Category:** New to Julia\
**Tags:** flux\
**Created:** [August 30, 2022, 2:59pm UTC](https://discourse.julialang.org/t/flux-dense-format-not-accepted/86553 "2022-08-30T14:59:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Post date:** [August 30, 2022, 2:59pm UTC](https://discourse.julialang.org/t/flux-dense-format-not-accepted/86553/1 "2022-08-30T14:59:40Z")

</div>

Hello,

Till recently, I was using the Dense call below with no problems:

```julia
Flux.Dense( 3920 => 10, relu )

```

At present, under Flux v0.13.5, the following error comes up:

> ERROR: MethodError: no method matching Dense(::Pair{Int64, Int64}, ::typeof(relu))  
> Closest candidates are:  
> Dense(::M, ::Any) where M\<:(AbstractMatrix{T} where T) at /home/ciro/.julia/packages/Flux/7nTyc/src/layers/basic.jl:127  
> Dense(::M, ::Any, ::F) where {M\<:(AbstractMatrix{T} where T), F} at /home/ciro/.julia/packages/Flux/7nTyc/src/layers/basic.jl:127

The below call, however, works:

```julia
Flux.Dense(3920, 10, relu)

```

Thanks in advance for advising, as the documentation apparently indicates the first call as valid:

```julia
Dense(in => out, σ=identity; bias=true, init=glorot_uniform)
Dense(W::AbstractMatrix, [bias, σ])

```

---

<div class="post-metadata">

**Author:** ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)\
**Post date:** [August 30, 2022, 3:21pm UTC](https://discourse.julialang.org/t/flux-dense-format-not-accepted/86553/2 "2022-08-30T15:21:18Z")

</div>

This most likely indicates you have an older version of Flux. Or perhaps have upgraded while it was running, or something like that? This notation was in [v0.13.0](https://github.com/FluxML/Flux.jl/releases/tag/v0.13.0) (the first release under new management).

---

<div class="post-metadata">

**Author:** ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Post date:** [August 30, 2022, 6:42pm UTC](https://discourse.julialang.org/t/flux-dense-format-not-accepted/86553/3 "2022-08-30T18:42:00Z")

</div>

Refreshing Flux installation has fixed the issue. Thanks.
