TextModels PoSTagger error due to Flux.jl

I have a problem with TextAnalysis PoSTagger.
When I try to load PoSTagger:
pos = PoSTagger()
the following error occurs:
ERROR: LoadError: MethodError: no method matching Flux.Conv(::typeof(identity), ::Array{Float32, 4}, ::Vector{Float32}, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64}) Closest candidates are: Flux.Conv(::F, ::A, ::V, ::Tuple{Vararg{Int64, N}}, ::Tuple{Vararg{Int64, M}}, ::Tuple{Vararg{Int64, N}}, ::Int64) where {N, M, F, A, V} at .\.julia\packages\Flux\ZnXxS\src\layers\conv.jl:96 Flux.Conv(::AbstractArray{T, N}, ::Any, ::Any; stride, pad, dilation, groups) where {T, N} at .\.julia\packages\Flux\ZnXxS\src\layers\conv.jl:128 Flux.Conv(::Tuple{Vararg{Integer, N}}, ::Pair{var"#s150", var"#s149"} where {var"#s150"<:Integer, var"#s149"<:Integer}, ::Any; init, stride, pad, dilation, groups, weight, bias) where N at .\.julia\packages\Flux\ZnXxS\src\layers\conv.jl:137

Does that error mean that TextAnalysis is working incorrectly?

Can you post a full, formatted stacktrace (use triple backticks ```)? It’s important to know where and how TextModels is trying to construct that conv layer.

@ ToucheSir
The error with PoSTagger is following

ERROR: LoadError: MethodError: no method matching Flux.Conv(::typeof(identity), ::Array{Float32, 4}, ::Vector{Float32}, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64})
Closest candidates are:
  Flux.Conv(::F, ::A, ::V, ::Tuple{Vararg{Int64, N}}, ::Tuple{Vararg{Int64, M}}, ::Tuple{Vararg{Int64, N}}, ::Int64) where {N, M, F, A, V} at C:\Users\Max Lubov\.julia\packages\Flux\ZnXxS\src\layers\conv.jl:96
  Flux.Conv(::AbstractArray{T, N}, ::Any, ::Any; stride, pad, dilation, groups) where {T, N} at C:\Users\Max Lubov\.julia\packages\Flux\ZnXxS\src\layers\conv.jl:128 
  Flux.Conv(::Tuple{Vararg{Integer, N}}, ::Pair{var"#s150", var"#s149"} where {var"#s150"<:Integer, var"#s149"<:Integer}, ::Any; init, stride, pad, dilation, groups, weight, bias) where N at C:\Users\Max Lubov\.julia\packages\Flux\ZnXxS\src\layers\conv.jl:137
  ...
Stacktrace:
 [1] TextModels.BiLSTM_CNN_CRF_Model(labels::Vector{String}, chars_idx::Dict{Char, Int32}, words_idx::Dict{String, Int32}, UNK_char_idx::Int32, UNK_Word_idx::Int32, 
weights_path::String)
   @ TextModels C:\Users\Max Lubov\.julia\dev\TextModels\src\sequence\sequence_models.jl:76
 [2] PoSTagger(dicts_path::String, weights_path::String)
   @ TextModels C:\Users\User1\.julia\dev\TextModels\src\sequence\pos.jl:14
 [3] PoSTagger()
   @ TextModels C:\Users\User1\.julia\dev\TextModels\src\sequence\pos.jl:10
 [4] top-level scope
   @ c:\prjs\pos_model\src\pos_model.jl:7
in expression starting at c:\prjs\pos_model\src\pos_model.jl:1

The error occurs when model initialization is performed (model = )

function PoSTagger(dicts_path, weights_path)
    labels, chars_idx, words_idx = load_model_dicts(dicts_path, false)
    model = BiLSTM_CNN_CRF_Model(labels, chars_idx, words_idx, chars_idx[PoSCharUNK], words_idx[PoSWordUNK], weights_path)
    PoSModel(model)
end

Thanks, I’ve opened a PR at Use kwarg Conv constructor instead of default by ToucheSir · Pull Request #32 · JuliaText/TextModels.jl · GitHub with a fix.