question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception in main training loop: module 'cupy.cudnn' has no attribute 'pooling_forward'

See original GitHub issue

Hi, When I run chainer/examples/imagenet/train_imagenet_data_parallel.py, I got this error.

/home/dnn/.pyenv/versions/ymd/bin/python3 /home/dnn/ymd/chainer/examples/imagenet/train_imagenet_data_parallel.py train.txt val.txt
/home/dnn/ymd/chainer/chainer/training/updaters/multiprocess_parallel_updater.py:164: UserWarning: optimizer.lr is changed to 0.00125 by MultiprocessParallelUpdater for new batch size.
format(optimizer.lr))
Exception in main training loop: module 'cupy.cudnn' has no attribute 'pooling_forward'
Traceback (most recent call last):
  File "/home/dnn/ymd/chainer/chainer/training/trainer.py", line 315, in run
    update()
  File "/home/dnn/ymd/chainer/chainer/training/updaters/standard_updater.py", line 165, in update
    self.update_core()
  File "/home/dnn/ymd/chainer/chainer/training/updaters/multiprocess_parallel_updater.py", line 237, in update_core
    loss = _calc_loss(self._master, batch)
  File "/home/dnn/ymd/chainer/chainer/training/updaters/multiprocess_parallel_updater.py", line 271, in _calc_loss
    return model(*in_arrays)
  File "/home/dnn/ymd/chainer/chainer/link.py", line 242, in __call__
    out = forward(*args, **kwargs)
  File "/home/dnn/ymd/chainer/examples/imagenet/nin.py", line 28, in forward
    h = F.max_pooling_2d(F.relu(self.mlpconv1(x)), 3, stride=2)
  File "/home/dnn/ymd/chainer/chainer/functions/pooling/max_pooling_2d.py", line 383, in max_pooling_2d
    return func.apply((x,))[0]
  File "/home/dnn/ymd/chainer/chainer/function_node.py", line 263, in apply
    outputs = self.forward(in_data)
  File "/home/dnn/ymd/chainer/chainer/function_node.py", line 369, in forward
    return self.forward_gpu(inputs)
  File "/home/dnn/ymd/chainer/chainer/functions/pooling/max_pooling_2d.py", line 64, in forward_gpu
    return super(MaxPooling2D, self).forward_gpu(x)
  File "/home/dnn/ymd/chainer/chainer/functions/pooling/pooling_2d.py", line 54, in forward_gpu
    cudnn.pooling_forward(
Will finalize trainer extensions and updater before reraising the exception.
Process _Worker-3:

my environment is

  • Chainer version: 5.0.0
  • CuPy version: 6.0.0a1
  • OS/Platform: Ubuntu18.04
  • CUDA/cuDNN version 10.0/7.4.1

Any help would be useful, thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
beam2dcommented, Feb 19, 2019

I hope the problem has been resolved, but just a note: Chainer does not prefer any specific Python environment management tools over the others. If you still have an installation problem with pyenv, do not hesitate to reopen it or open a new issue. Thanks!

0reactions
fiarabbitcommented, Feb 19, 2019

I apologize that I unintentionally led the reader not to use a specific python environment.

For the compensation, I show a small reproduction code of the situation which reported by @crook52 (i.e. the reason of my inference). I just guessed that something like this might have happened for his situation.

$ pyenv install 3.6.0 3.6.1
$ pyenv global 3.6.0
$ git clone <chainer-repository>
$ pip install -e <chainer-repository>
$ pyenv local 3.6.1
$ pip install chainer==v5.0.0
$ $PYENV_ROOT/versions/3.6.0/bin/python -c "import chainer;print(chainer.__versions__)"
6.0.0b2
$ python
>>> import chainer
>>> chainer.print_runtime_info()
Platform: Linux-4.4.0-135-generic-x86_64-with-debian-stretch-sid
Chainer: 5.0.0
NumPy: 1.16.1
CuPy: Not Available
iDeep: Not Available
Read more comments on GitHub >

github_iconTop Results From Across the Web

Chainer module 'cupy.cudnn' has no attribute ...
I have no clue about the problem now. Exception in main training loop: module 'cupy.cudnn' has no attribute 'softmax_forward' Traceback ...
Read more >
Developer Guide :: NVIDIA Deep Learning cuDNN ...
cuDNN offers a context-based API that allows for easy multithreading and (optional) interoperability with NVIDIA ® CUDA ® streams. 1.1.
Read more >
「module 'cupy.cudnn' has no attribute 'pooling_forward'」 ...
Exception in main training loop : module 'cupy.cudnn' has no attribute 'pooling_forward' Traceback (most recent call last): File ...
Read more >
Cupy Attribute error when running Spacy on GPU - usage
I have installed spacy cuda using the below, to train a model using the GPU, and speed things up. pip install -U spacy[cuda92]...
Read more >
https://openi.pcl.ac.cn/OpenI/Paddle/commit/e2ca8e...
+# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found