BSON.jl
BSON.jl copied to clipboard
Recover saved Flux model from Julia 1.0 in Julia 1.1
Hi, I have saved a trained Flux model in julia 1.0 a while ago and would like to retrieve it in julia 1.1 but I am getting the following error:
julia> BSON.load("model_car_1.bson")
ERROR: BoundsError: attempt to access Core.TypeofBottom
at index [1]
Stacktrace:
[1] newstruct!(::Type, ::Array{Any,1}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/extensions.jl:91
[2] newstruct_raw(::IdDict{Any,Any}, ::Type, ::Dict{Symbol,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/extensions.jl:109
[3] (::getfield(BSON, Symbol("##47#48")))(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/extensions.jl:124
[4] raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/read.jl:80
[5] (::getfield(BSON, Symbol("##22#24")){IdDict{Any,Any}})(::Dict{Symbol,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/read.jl:74
[6] applychildren!(::getfield(BSON, Symbol("##22#24")){IdDict{Any,Any}}, ::Dict{Symbol,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[7] _raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/read.jl:74
[8] raise_recursive(::Dict{Symbol,Any}, ::IdDict{Any,Any}) at /home/boutonm/.julia/packages/BSON/kxdIr/src/read.jl:81
[9] raise_recursive at /home/boutonm/.julia/packages/BSON/kxdIr/src/read.jl:91 [inlined]
[10] load(::String) at /home/boutonm/.julia/packages/BSON/kxdIr/src/read.jl:96
[11] top-level scope at none:0
In julia 1.0 I can load the model fine. I have the same version of Flux (v0.7.2) and BSON (v0.2.1) on both installations. This is I believe the versions that were used to train and save the old model.
Do you have any suggestions on how to load the model without error in julia 1.1? Thanks