AttributeError: 'module' object has no attribute 'BatchNormLayer'

  • 环境
  • 问题
  • 解决方法
  • 参考

环境

用Anaconda配置的环境

python                    2.7.13
theano                    0.9.0
git                       2.11.1

问题

在使用Anaconda安装Lasagne时,会自动的安装0.1版本,但程序运行会出现以下错误:

AttributeError: 'module' object has no attribute 'BatchNormLayer'

查看normalization.py,也没有 BatchNormLayer 类存在,因该是在Anaconda 下安装 Lasagne 出了问题。

解决方法

首先卸载掉之前安装的Lasagne,再在Aanconda Prompt中运行:

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

再查看Lasagne的版本:

lasagne                   0.2.dev1

以上问题得以解决。

参考

https://lasagne.readthedocs.io/en/latest/user/installation.html

你可能感兴趣的:(theano,lasagne,anaconda)