BSON.jl
BSON.jl copied to clipboard
Can't load binary when not working in Main
MWE
This works since its applied in the context of Main.
using Flux, BSON
m = Chain(Dense(3,3), Dense(3,3), softmax)
BSON.@save "mwe.bson" m
const m = BSON.@load("mwe.bson")
Now replace this with a non-Main context.
module MWE
using Flux, BSON
# m = Chain(Dense(3,3), Dense(3,3), softmax)
# BSON.@save "mwe.bson" m
const m = BSON.@load("mwe.bson")
end
ref #91
Adding discussion from the bi-weekly call. Solution here is to add module (@__MODULE__ by default?) when using the @load macro.