torch2coreml icon indicating copy to clipboard operation
torch2coreml copied to clipboard

setup.sh fails when converting to CoreML.

Open teologov opened this issue 6 years ago • 5 comments

Hi, I am trying to setup your project and setup.sh script fails with next error for every model:

Preparing models for conversion
/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 th> torch.load('./fast-neural-style/models/instance_norm/la_muse.t7').model and it still fails:

/Users/teologov/torch/install/share/lua/5.2/torch/File.lua:375: unknown object
stack traceback:
        /Users/teologov/torch/install/share/lua/5.2/trepl/init.lua:506: in function </Users/teologov/torch/install/share/lua/5.2/trepl/init.lua:499>
        [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'
        [string "_RESULT={torch.load('./fast-neural-style/mode..."]:1: in main chunk
        [C]: in function 'xpcall'
        /Users/teologov/torch/install/share/lua/5.2/trepl/init.lua:661: in function 'repl'
        ...ogov/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk
        [C]: in ?

teologov avatar Jan 15 '18 09:01 teologov

The issue is gone after I manually cloned the fast-neural-style one more time.

teologov avatar Jan 15 '18 22:01 teologov

I have the same issue. And also try th> torch.load('./fast-neural-style/models/instance_norm/la_muse.t7').model and still fails.

And cloned fast-neural-style seems not working for me.

I work dir is where the setup.sh in I just run

cd ./example/fast-neural-style
sh setup.sh

leavesster avatar Jan 17 '18 06:01 leavesster

After manually download all models, It works perfect. It seems curl just download a 301 Moved Permanently

leavesster avatar Jan 17 '18 10:01 leavesster

@leavesster where and how to manually download the modes ? thanks

MrThiago avatar Mar 26 '18 06:03 MrThiago

@MrThiago this repo will automatic clone fast-neural-style the problem is fix in its pr pull144.

leavesster avatar Mar 26 '18 07:03 leavesster