For some reason a file that I am including is simply not getting loaded

I am trying to load a model using the ONNX package and have posted this as an issue on github here:https://github.com/FluxML/ONNX.jl/issues/36

In short, I am trying to include a file in my directory but Julia is saying that it cannot load the file, no additional details are provided. I am sure that I am in the right directory, but the file simply doesn’t load. Has anyone had this issue?

Thanks

I believe include loads from the directory relative to where the calling file is located at…so if you the file calling include is in /home/foo then that is where it will look for the new file. You could try using absolute paths if you don’t want to specify a relative directory.

1 Like

Unfortunately I have tried this as well, whether I write “model.jl” or the full path copied in, I get the same error :frowning:

Odd, how about something like:

include_string(@__MODULE__, read("model.jl", String))

Sorry, the error is different, not the same as before! When using the absolute path I get the error
LoadError: UndefVarError: pad=(0, 0, 1, 1) not defined
in expression starting at /home/pratiksamant/JuliaCodes/AlexNEt/bvlc_alexnet/model.jl:4
top-level scope at model.jl:5
include at boot.jl:328 [inlined]
include_relative(::Module, ::String) at loading.jl:1105
include(::Module, ::String) at Base.jl:31
include(::String) at client.jl:424
top-level scope at LoadAlexNEt.jl:7

Okay so that says it’s loading the model.jl file, but that you have an error at line 4…

1 Like