Comments (18)
@ajtulloch We're trying to convert the pretrained Resnet Torch models here with torch2caffe
but running into a problem where SpatialBatchNormalization
layer is not supported. Do you have any update on adding support for that? How would we go about doing that?
from fb-caffe-exts.
Sure, I need to resync with our internal branch. Give me a few hours.
from fb-caffe-exts.
I worked around this issue by using LD_PRELOAD to load libcaffe shared object. I did encounter other issues such as unimplemented layers (LRN) which I was able to handle as well. I'm going to close this issue out and open a separate issue for other questions. Thanks!
from fb-caffe-exts.
Hi Vimalthilak,
Sorry I missed this - yes, this uses fblualib's Python, so you need to ensure that pycaffe, libcaffe.so is on PYTHONPATH, etc.
For the additional layers - we're essentially adding them as-needed. I need to sync up and add a few new ones (cudnn.SpatialBatchNormalization, nn.CAddTable I think are the only additions). LRN would be cool - I assume you mean cudnn.SpatialCrossMapLRN?
from fb-caffe-exts.
Hi @ajtulloch,
Thanks for the response!
- I assume you mean cudnn.SpatialCrossMapLRN?
It can be cudnn.SpatialCrossMapLRN or nn.SpatialCrossMapLRN. This layer is easy enough that I hacked around lib.lua and lib_py.py (IIRC) to get these to work.
By any chance, have you had a chance to port the model in https://github.com/soumith/inception.torch to caffe.
A port of inception-v3 would be nice as well but that requires batch normalization layer. Not sure if it's doable as-is.
I am happy to provide any help, if doable, if that helps with your effort to develop and add features to and/or test this library.
Thanks!
from fb-caffe-exts.
Hi,
Where did you find torch2caffe.lib? I am getting the next error:
/usr/local/bin/luajit: torch2caffe.lua:9: module 'torch2caffe.lib' not found:No LuaRocks module found for torch2caffe.lib
Thanks
from fb-caffe-exts.
@fhdiaze It's the lib module under torch2caffe. I think you need to ensure that lib under /torch2caffe is in the path somewhere.
from fb-caffe-exts.
@vimalthilak thanks for the response, which file do you mean? all? I do not have so much experience with lua.
Thanks.
from fb-caffe-exts.
It should work if you have the torch2caffe
directory somewhere in package.path
in Lua.
from fb-caffe-exts.
Hi,
I am doing:
package.path = package.path .. ';/home/fhdiaze/Code/fb-caffe-exts/torch2caffe/?.lua
and after that
local t2c = require 'torch2caffe.lib'
But I am getting the next error:
[string "local t2c = require 'torch2caffe.lib'..."]:1: module 'torch2caffe.lib' not found:No LuaRocks module found for torch2caffe.lib
Do I have to install using luarocks?
Thanks
from fb-caffe-exts.
Does something like http://stackoverflow.com/questions/18125775/lua-require-fails-to-find-submodule-but-searchpath-succeeds work?
from fb-caffe-exts.
Sure, I need to resync with our internal branch. Give me a few hours.
from fb-caffe-exts.
@ajtulloch 👍 thanks!
from fb-caffe-exts.
@ajtulloch Do you have any update on the resync? Thanks!
from fb-caffe-exts.
I have got the test running now (penlight was causing problems), but all are failing:
Using `cudnn`
>>>>>>>>> Test
>>> Test:testAlexnet
Failed
>>> Test:testConvolution
Failed
>>> Test:testDropout
Failed
>>> Test:testFBThreshold
Failed
>>> Test:testGoogLeNet
Failed
>>> Test:testInception
Failed
>>> Test:testInceptionComponents
checking model
nn.Sequential {
[input -> (1) -> (2) -> (3) -> output]
(1): nn.SpatialConvolution(3 -> 1, 1x1)
(2): nn.Dropout(0.500000)
(3): nn.ReLU
}
Failed
>>> Test:testLinear
Failed
>>> Test:testParallelModel
Failed
>>> Test:testReLU
Failed
>>> Test:testSequential
Failed
>>> Test:testSpatialConvolutionMM
Failed
>>> Test:testSpatialMaxPooling
Failed
>>> Test:testVggCombined
Failed
>>> Test:testVggConv
Failed
>>> Test:testVggLinear
Failed
>>> Test:testView
Failed
The error is due to:
t2c.run(opts, module) --attempt to call field 'run' (a nil value)
If anyone knows the root of this problem, please post. Thanks.
from fb-caffe-exts.
HI @ajtulloch, have you resync with your internal branch? It seems that is still report "Unknown layer type: nn.SpatialBatchNormalization".
thanks.
from fb-caffe-exts.
Dear ajtulloch
i have the same error...can you help me in this regard
/usr/bin/luajit: /usr/share/lua/5.1/trepl/init.lua:384: /usr/share/lua/5.1/trepl/init.lua:384: module 'fb.python' not found:No LuaRocks module found for fb.python
no field package.preload['fb.python']
no file '/tmp/buildd/.luarocks/share/lua/5.1/fb/python.lua'
no file '/tmp/buildd/.luarocks/share/lua/5.1/fb/python/init.lua'
no file '/usr/share/lua/5.1/fb/python.lua'
no file '/usr/share/lua/5.1/fb/python/init.lua'
no file './fb/python.lua'
no file '/usr/share/luajit-2.1.0-beta1/fb/python.lua'
no file '/usr/local/share/lua/5.1/fb/python.lua'
no file '/usr/local/share/lua/5.1/fb/python/init.lua'
no file '/home/siraj/.luarocks/share/lua/5.1/fb/python.lua'
no file '/home/siraj/.luarocks/share/lua/5.1/fb/python/init.lua'
no file '/tmp/buildd/.luarocks/lib/lua/5.1/fb/python.so'
no file '/usr/lib/lua/5.1/fb/python.so'
no file './fb/python.so'
no file '/usr/local/lib/lua/5.1/fb/python.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/siraj/.luarocks/lib/lua/5.1/fb/python.so'
no file '/tmp/buildd/.luarocks/lib/lua/5.1/fb.so'
no file '/usr/lib/lua/5.1/fb.so'
no file './fb.so'
no file '/usr/local/lib/lua/5.1/fb.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/siraj/.luarocks/lib/lua/5.1/fb.so'
stack traceback:
[C]: in function 'error'
/usr/share/lua/5.1/trepl/init.lua:384: in function 'require'
main.lua:8: in main chunk
[C]: in function 'dofile'
/usr/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
Error using run (line 38)
Failed to run Torch7 script.
from fb-caffe-exts.
@ajtulloch I have follow your steps... I compile Caffe with pycaffe and insert the path in .bashrc file. But now i got this error...
Can you help me in this regards..
Thanks
from fb-caffe-exts.
Related Issues (20)
- Some questions about using Predictor HOT 1
- issues building torch2caffe HOT 2
- is nn.gModule for input not valid?
- module 'fb.python' not found:No LuaRocks module found for fb.python HOT 5
- Unknown layer type: table HOT 9
- Usage of predictor HOT 1
- Optimizing advantage since cuDNN 5.1?
- torch2caffe.lua unknown Torch class <DenseCapModel> HOT 1
- fb.python not found HOT 3
- Unknown layer type: nn.SpatialFullConvolution
- Error while building thpp
- some questions about PooledPredictor
- torch2caffe with multi input
- "attempt to index upvalue 't2c' (a nil value)"
- How to use predictor HOT 6
- Build error for layers
- [Predictor][Compile Error][OSX] Undefined symbol for architecture x86_64, clang: error: linker command failed with exit code 1 HOT 3
- torch2caffe convertor HOT 1
- reduce memory usage, gpu memory or cpu memory?
- google test err
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fb-caffe-exts.