Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load binary when not working in Main #98

Open
DhairyaLGandhi opened this issue May 6, 2021 · 1 comment
Open

Can't load binary when not working in Main #98

DhairyaLGandhi opened this issue May 6, 2021 · 1 comment

Comments

@DhairyaLGandhi
Copy link
Collaborator

DhairyaLGandhi commented May 6, 2021

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

@darsnack
Copy link
Contributor

darsnack commented May 6, 2021

Adding discussion from the bi-weekly call. Solution here is to add module (@__MODULE__ by default?) when using the @load macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants