Python lasagne ImportError cannot import BatchNormLayer

When I try to play with the code here , I met a very strange error. All other modules can be imported correctly, with the exception of one.

In particular, the error:

ImportError: cannot import name BatchNormLayer

from the file here . And lasagne_extensions.layers looks like this:

from .density_layers import *
from lasagne.layers import *
from parmesan.layers import *

So, I believe that the problem should be that I did not install correctly lasagneor parmesan.

I tried to update the relevant modules, including numpy, scipy, theano, and lasagneto the latest version pip install --upgrade, respectively. There is no support pip installfor parmesan, so I downloaded and installed it again. However, the error remains.

Can someone give me some tips on what I should look at?

+4
source share
1 answer

The solution is to install an advanced version, but pip install --upgradeit does not.

But the problem can be solved:

pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip

Details here .

+7
source

All Articles