Recipes icon indicating copy to clipboard operation
Recipes copied to clipboard

vgg without gpu

Open maciejjaskowski opened this issue 8 years ago • 6 comments

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

maciejjaskowski avatar Apr 05 '16 17:04 maciejjaskowski

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

f0k avatar Apr 05 '16 17:04 f0k

Thanks!

maciejjaskowski avatar Apr 05 '16 18:04 maciejjaskowski

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?

maciejjaskowski avatar Apr 06 '16 12:04 maciejjaskowski

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

f0k avatar Apr 06 '16 14:04 f0k

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

maciejjaskowski avatar Apr 08 '16 14:04 maciejjaskowski

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.

f0k avatar Apr 08 '16 17:04 f0k