Skip to content
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

Can't create graph visualizations with inn.SpatialPyramidPooling #9

Closed
lim0606 opened this issue Apr 7, 2016 · 3 comments
Closed

Comments

@lim0606
Copy link

lim0606 commented Apr 7, 2016

Hi,

First of all, thank you for sharing your works :) I tried to use this package for visualization. It is really cool!

However, I failed to draw the graph of a network architecture with inn.SpatialPyramidPooling Layer.
(Actually the network is the one in your repository, https://github.com/fmassa/object-detection.torch/blob/refactoring/models/zeiler.lua)

/home/jaehyun/github/torch/install/bin/luajit: ...hyun/github/torch/install/share/lua/5.1/nn/Container.lua:69: 
In 3 module of nn.Sequential:
In 1 module of nn.Sequential:
...n/github/torch/install/share/lua/5.1/optnet/graphgen.lua:143: Parent node inexistant for module nn.Linear(12800 -> 4096)
stack traceback:
        [C]: in function 'assert'
        ...n/github/torch/install/share/lua/5.1/optnet/graphgen.lua:143: in function 'addEdge'
        ...n/github/torch/install/share/lua/5.1/optnet/graphgen.lua:168: in function <...n/github/torch/install/share/lua/5.1/optnet/graphgen.lua:162>
        [C]: in function 'xpcall'
        ...hyun/github/torch/install/share/lua/5.1/nn/Container.lua:65: in function 'rethrowErrors'
        ...yun/github/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function <...yun/github/torch/install/share/lua/5.1/nn/Sequential.lua:41>
        [C]: in function 'xpcall'
        ...hyun/github/torch/install/share/lua/5.1/nn/Container.lua:65: in function 'rethrowErrors'
        ...yun/github/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        ...n/github/torch/install/share/lua/5.1/optnet/graphgen.lua:197: in function 'generateGraph'
        models/create-zf.lua:54: in main chunk
        [C]: in function 'dofile'
        ...thub/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00406670

WARNING: If you see a stack trace below, it doesn't point to the place where this error occured. Please use only the one above.
stack traceback:
        [C]: in function 'error'
        ...hyun/github/torch/install/share/lua/5.1/nn/Container.lua:69: in function 'rethrowErrors'
        ...yun/github/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        ...n/github/torch/install/share/lua/5.1/optnet/graphgen.lua:197: in function 'generateGraph'
        models/create-zf.lua:54: in main chunk
        [C]: in function 'dofile'
        ...thub/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00406670

It seems like that this error would come from the same cause described in #6.

Is there anyone who can help me to find this problem?

Thanks

Best regards,

Jaehyun

@fmassa
Copy link
Owner

fmassa commented Apr 7, 2016

Hi,

Thanks for opening this issue. There are two possible solutions that I tried:

  • change inn.SpatialPyramidPooling and inn.SpatialSameResponseNormalization to behave like normal modules, and not containers szagoruyko/imagine-nn@ab295ee
  • handle this special case in optnet 541427d

In the first way, SpatialPyramidPooling will be printed as a single module, whereas in the second one it will be printed as an ensemble of modules.

If you update optimize-net it should work in the second way I described.

@szagoruyko any thoughts about that ?

@szagoruyko
Copy link
Contributor

@fmassa I think this kind of modules should be treated as one node without going inside, can you do that in graphgen? it's actually a nice way to simplify complicated structures by hiding their insides

@lim0606
Copy link
Author

lim0606 commented Apr 8, 2016

@fmassa

Thank you for your kind response!

It works well :)

Best regards,

Jaehyun

@lim0606 lim0606 closed this as completed Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants