GithubHelp home page GithubHelp logo

Comments (8)

f0k avatar f0k commented on June 9, 2024

How much do they differ? Is this on CPU or GPU? Do you use cuDNN?

from recipes.

yassersouri avatar yassersouri commented on June 9, 2024

I use GPU and cuDNN for both caffe and lasagne. Also I have just installed Theano and Lasagne from master today.

The l2 norm of their difference for an example image is 0.14590697. (the example image the is cat image used in the caffe tutorial)

plt.plot(lasagne_out - caffe_out)

Here is a plot of the difference, as I said they are very similar.

index

from recipes.

yassersouri avatar yassersouri commented on June 9, 2024

Well this was not a good example (since some might think the preprocessing is not the same for caffe and lasagne).

For the input np.zeros((1, 3, 224, 224), dtype=np.float32) the l2 norm of the difference is 0.096159138.

Also here is the plot for plt.plot(lasagne_out - caffe_out).

index

from recipes.

ebenolson avatar ebenolson commented on June 9, 2024

Hi @yassersouri, thanks for your report.

It looks like several of the pooling layers should use ignore_border=False but are not. My guess is that when I wrote this I was using an older version of Lasagne (before Lasagne/Lasagne#374).

With this change I get an l2 norm of the difference for zero input of 9.7e-8, I will push an updated version shortly.

from recipes.

yassersouri avatar yassersouri commented on June 9, 2024

@ebenolson Thanks.

from recipes.

f0k avatar f0k commented on June 9, 2024

Oh, good catch! Sadly, this also means it won't be able to use cuDNN for pooling any more (it always ignores the border).

from recipes.

yassersouri avatar yassersouri commented on June 9, 2024

Do other models in the model zoo need similar updates?

from recipes.

ebenolson avatar ebenolson commented on June 9, 2024

I don't think so - I seem to remember this being a peculiarity of googlenet (I think this is why I was using both Pool2DLayer and Pool2DLayerDNN).

However, it would be good to verify that, and add some numerical tests to catch any future problems. PR's welcome 😄

from recipes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.