ImportError无法导入名称FunctionSet

时间:2017-06-02 13:16:47

标签: python python-2.7 chainer

我已安装了chainer,但我仍然遇到此错误请帮忙修复它!

Traceback (most recent call last):
  File "/home/hoda/Downloads/vae-1-master/source/vae_mnist.py", line 1, in <module>
    from chainer import FunctionSet,Variable
ImportError: cannot import name FunctionSet

这是代码的一部分

from chainer import FunctionSet,Variable
import chainer.functions as F
import numpy
from vae_model import VAE_bernoulli,VAE_gaussian

1 个答案:

答案 0 :(得分:1)

http://docs.chainer.org/en/stable/upgrade.html

  

删除了一些过时的类和函数   chainer.FunctionSet(改为使用ChainChainList