lasagne cannot import BatchNormLayer

1,337 views
Skip to first unread message

wanghao...@gmail.com

unread,
Mar 18, 2016, 3:09:33 PM3/18/16
to lasagne-users
I have met a problem about lasagne ImportError: cannot import BatchNormLayer from the following line: 
from lasagne.layers import BatchNormLayer 

I have checked the source code, BatchNormLayer seems not in lasagne.layers, but I believe you have implemented it since many people have used it, where can I find it? 

I am using python 2.7, could this be the issue. 

I have pip install --upgrade my numpy, scipy, theano and lasagne, so I version problem of these packages is not an issue? 


Thanks,
Haohan

Sander Dieleman

unread,
Mar 18, 2016, 4:24:19 PM3/18/16
to lasagne-users
If you install Lasagne through "pip install Lasagne", you will get the 0.1 release. This does not have BatchNormLayer. We recommend using the latest version from git, which is stable enough for daily use. (The same goes for Theano by the way.)

Have a look at the installation instructions to find out how to install it: http://lasagne.readthedocs.org/en/latest/user/installation.html#bleeding-edge-version

Sander

André Lopes

unread,
Mar 19, 2016, 9:27:21 AM3/19/16
to lasagne-users, wanghao...@gmail.com
I didnt know lasagne had BatchNormLayer already!

Is there a page on the wiki describing how to use it?

Sander Dieleman

unread,
Mar 19, 2016, 2:29:30 PM3/19/16
to lasagne-users

André Lopes

unread,
Mar 19, 2016, 11:13:46 PM3/19/16
to lasagn...@googlegroups.com
Sorry, i thought was something uber-new implemented and still didnt have a page added.


--
You received this message because you are subscribed to a topic in the Google Groups "lasagne-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lasagne-users/JeqUvHvOlGw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lasagne-user...@googlegroups.com.
To post to this group, send email to lasagn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lasagne-users/e489d85d-c8a6-4a8f-9721-b0e5da795fb6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sander Dieleman

unread,
Mar 20, 2016, 9:02:24 AM3/20/16
to lasagne-users
No worries :) As a general rule, we do not merge PRs without appropriate tests and documentation, so the minute something lands into the Lasagne master branch, there should be documentation for it.

mathsw...@gmail.com

unread,
Oct 13, 2016, 12:16:12 PM10/13/16
to lasagne-users
It is still okay to use pip install using their methods ?

Jan Schlüter

unread,
Oct 14, 2016, 4:56:50 AM10/14/16
to lasagne-users, mathsw...@gmail.com
It is still okay to use pip install using their methods ?

Not sure what you mean by "their methods", but I'd recommend installing the bleeding-edge version:
http://lasagne.readthedocs.org/en/latest/user/installation.html#bleeding-edge-version

A mere "pip install lasagne" will still give you version 0.1 from August 2015 -- we're not exactly quick in releasing new versions, any help is appreciated (https://github.com/Lasagne/Lasagne/issues?q=is%3Aopen+is%3Aissue+milestone%3Av0.2).

Best, Jan
Reply all
Reply to author
Forward
0 new messages