fast-neural-style icon indicating copy to clipboard operation
fast-neural-style copied to clipboard

Can't load model with torch

Open teologov opened this issue 7 years ago • 2 comments

Hey, I am trying to play around with your project, I want to convert model to CoreML, and my script fails with next error:

Preparing models for conversion
fast-neural-style/models/eccv16/candy.t7
/Users/teologov/torch/install/bin/lua: /Users/teologov/torch/install/share/lua/5.2/torch/File.lua:375: unknown object
stack traceback:
        [C]: in function 'error'
        /Users/teologov/torch/install/share/lua/5.2/torch/File.lua:375: in function 'readObject'
        /Users/teologov/torch/install/share/lua/5.2/torch/File.lua:409: in function 'load'
        prepare_model.lua:29: in function 'main'
        prepare_model.lua:46: in main chunk
        [C]: in function 'dofile'
        ...ogov/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: in ?

I tried manually to load the model with torch.load('./fast-neural-style/models/instance_norm/la_muse.t7').model, and even this command fails...

Could you please point me what's wrong? I am using MacOS v10.13.2, Torch7, Lua 5.2.3

teologov avatar Jan 14 '18 20:01 teologov

The issue is gone after I cloned the repo again... Thanks for the cool project @jcjohnson!

teologov avatar Jan 15 '18 22:01 teologov

I was running the setup.sh from the git repo torch2coreml and came across the same problem here, tried a bunch of ways but none of which help. I don't know the reason but re-clone the repo worked out! Thanks a lot. @teologov

wei20 avatar Jan 20 '18 02:01 wei20