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

Loading pre-trained models, e.g. VGG #21

Open
joschu opened this issue Sep 1, 2015 · 2 comments
Open

Loading pre-trained models, e.g. VGG #21

joschu opened this issue Sep 1, 2015 · 2 comments

Comments

@joschu
Copy link
Owner

joschu commented Sep 1, 2015

It would be nice to be able to load well-known pre-trained models like VGG and GoogLeNet into CGT data-structures.
There's a half-written script for loading Caffe prototxt files, called caffe2cgt.py.
For VGG, all of the operations are already implemented, whereas some of the other models involve "local response normalization" layers that are not yet implemented.

@benanne
Copy link

benanne commented Sep 1, 2015

I think the general consensus is that local response normalization is sort of pointless. To the best of my knowledge people aren't really using this anymore. That said, if you want to reproduce existing models exactly I guess you have no choice but to implement it. It's just a bit unfortunate to be spending valuable development time on stuff like this :)

We have a pure-Theano implementation in Lasagne: https://github.com/Lasagne/Lasagne/blob/master/lasagne/layers/normalization.py#L47
That should translate to CGT fairly well, I assume! It's not the fastest, but maybe it'll save you some time.

@joschu
Copy link
Owner Author

joschu commented Sep 2, 2015

That's interesting to hear that LRN is not considered to be important anymore, and thanks for the pointer to the Lasagne code.

I was also thinking about implementing the cross-channel LRN with a matrix multiplication (after permuting the axes so that channels are last) and the 2D neighborhood version as im2col + matrix multiplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants