Closed NetzerEitan closed 8 years ago
I assume you replaced the Conv2DDNNLayer
with a Conv2DLayer
to run on CPU. In this case, you need to flip the filter kernels, because Conv2DDNNLayer
by default performs a correlation rather than a convolution.
try running this after loading the parameters:
for layer in net.values():
if type(layer) == ConvLayer:
W = layer.W.get_value()
W = W[:, :, ::-1, ::-1]
layer.W.set_value(W)
Thank
I tried as you suggested, but it did not help.
I had a typo, should be W = W[:, :, ::-1, ::-1]
.
Yes I noticed tried both...
Have you made any other changes to the code? What versions of Theano and Lasagne are you using?
No, I have not changed anything.
theano.version = 0.7.0.dev-15c90dd36c95ea2989a2c0085399147d15a6a477 lasagne.version = 0.2.dev1
Hmm.. it works for me: https://gist.github.com/ebenolson/e41398fe067d42fc16d8, if you still see a different result try running the Lasagne test suite, perhaps there is something wrong with your installation.
Thank you very much I will try.
Hi all,
I tried the great example of ImageNet Pretrained Network (VGG_S).ipynb. https://github.com/Lasagne/Recipes/blob/master/examples/ImageNet%20Pretrained%20Network%20(VGG_S).ipynb
With GPU I get the same result in the tutorial. But with a CPU I am getting different results.
For example instead of "German Shepherd" the net "thinks" its "Border terrier"
Why is that? Can I fix it?
Best Eitan