-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Could not open file model.jl #36
Comments
Are you sure you're in the same directory as the model.jl file? If not, you might have to specify the entire path to the file to open it. |
Yes I am sure that I am in the same directory, indeed Here is the output of readdir:
|
This is really strange, I'm not quite sure what's happening here. I can see that you're doing |
I tried cd-ing to the directory before but no luck :( I am certain the directory is correct, not sure what the issue could be especially as the weights load just fine |
Just do
(See the |
If you are doing this a lot, you could also define a function to cwd_include(path::AbstractString) = include(joinpath(pwd(), path)) |
I have tried |
Maybe ONNX.jl does not yet support asymmetrical padding? |
I think I remember adding support for asymmetric padding. Are you on the latest Flux? |
I tried to reproduce OPs error, using Flux 0.9 (latest?). Here's how lines 5 and 6 of the model.jl looks like: |
Thanks for that. Not sure where |
Thank you so much! Please keep me posted. |
Hi Ayush, |
Not yet. However, if you just want to use the model, you can manually remove |
Thanks Ayush, how would I remove var from a model file? |
@sama2689: The model.jl file should just be (poorly formatted and quite compact) julia code, so you can open it up in an editor and edit it like you would edit any code. If you are in need of a quick fix you can try using this: https://github.com/DrChainsaw/ONNXmutable.jl I think that alexnet model is one of the models I tested it with. |
Thanks, I have removed var from the model.jl file but now I get the error The original model.jl is shown below
my edited version of model.jl is shown below
|
Hi, It means that LRNorm is not implemented. It seems like the package author left a hook for it so that people can implement it themselves if really needed. From what I understand, the DL community has basically stopped using that type of layer as it turned out to not provide any value. This may explain why noone has prioritized getting an implementation into Flux yet. It will not work with my package either btw. Perhaps the model will perform roughly the same if you remove the LRNorms (perhaps with some retraining). Does it have to be alexnet or could you use VGG or a resnet instead? I belive they don't use LRNorm. |
That's right; while I was working on this package, local response normalisation wasn't implemented in Flux. Initially I replaced all LRNorm layers with identity to merely bypass the input, but I remember the results were a bit inconsistent, so for the moment I've added a "hook", which means you'd need to define the forward pass of LRNorm yourself. |
I am able to import the alexnet ONNX file with the code
The weights load just fine with no issues.
However when I try to open the associated .jl file using
model=include("model.jl")
I get the error
'could not open file .../model.jl
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:6'
I have confirmed that the file does exist, but julia is not able to load it.
For reference, the alexnet model I am trying to load can be found here: https://github.com/onnx/models/tree/master/vision/classification/alexnet
The text was updated successfully, but these errors were encountered: