Lasagne / Recipes

Lasagne recipes: examples, IPython notebooks, ...
MIT License
913 stars 419 forks source link

vgg without gpu #55

Open maciejjaskowski opened 8 years ago

maciejjaskowski commented 8 years ago

All networks in the zoo use DNN. Is there a way to use a pretrained model if I don't have GPU installed ?

f0k commented 8 years ago

Yes, change Conv2DDNNLayer to Conv2DLayer and make sure you pass flip_filters=False in the convolution layer constructors. Then change MaxPool2DDNNLayer to MaxPool2DLayer.

maciejjaskowski commented 8 years ago

Thanks!

maciejjaskowski commented 8 years ago

Wait a second @f0k. Argument flip_filters does not exist in Conv2DLayer but the vgg16.py sets flip_filters=False. How should I understand your suggestion?

f0k commented 8 years ago

You will need to update to the bleeding-edge version of Lasagne for this: http://lasagne.readthedocs.org/en/latest/user/installation.html#bleeding-edge-version

maciejjaskowski commented 8 years ago

Ok, that worked, thanks again. Do you think a 'cpu' argument could be included in lasagne recipes ?

f0k commented 8 years ago

We could simply change the file as I suggested to you, it will still use cuDNN when it's available. However, examples would stop working for Lasagne 0.1, so we should wait until we managed to release 0.2.