JuliaIO / BSON.jl

Other
158 stars 39 forks source link

UndefVarError: Flux not defined when creating the project #77

Open Stamp1993 opened 3 years ago

Stamp1993 commented 3 years ago

Built own project, the current code is:

module NewProject

import Flux
import BSON
using Flux, Tracker, BSON

function read_ANN()
  @BSON.load "Processmodel2.bson" m
  return m
end

m = read_ANN()

end # module

Project.toml and Manifest.toml are OK, when I'm running this code directly - everything goes fine, when I'm tryin to import this project - I get the ERROR: LoadError: UndefVarError: Flux not defined caused by BSON

BCRARL commented 2 years ago

Try

m = BSON.load("Processmodel2.bson",@__MODULE__)[:m]