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.

AttributeError: 'NoneType' object has no attribute 'run_slave'

See original GitHub issue

Hi ZHang:

segmentation

when i train segmentation model,

CUDA_VISIBLE_DEVICES=0  python train.py --dataset pcontext --model encnet --aux --se-loss

i face an error:

Using poly LR Scheduler!
Starting Epoch: 0
Total Epoches: 80
  0%|                                                                                                                                         | 0/1249 [00:00<?, ?it/s]
=>Epoches 0, learning rate = 0.0003,                 previous best = 0.0000
Traceback (most recent call last):
  File "train.py", line 175, in <module>
    trainer.training(epoch)
  File "train.py", line 105, in training
    outputs = self.model(image)
  File "/root/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 468, in __call__
    result = self.forward(*input, **kwargs)
  File "/root/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 121, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/root/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 468, in __call__
    result = self.forward(*input, **kwargs)
  File "/root/anaconda3/lib/python3.6/site-packages/encoding/models/encnet.py", line 32, in forward
    features = self.base_forward(x)
  File "/root/anaconda3/lib/python3.6/site-packages/encoding/models/base.py", line 51, in base_forward
    x = self.pretrained.bn1(x)
  File "/root/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 468, in __call__
    result = self.forward(*input, **kwargs)
  File "/root/anaconda3/lib/python3.6/site-packages/encoding/nn/syncbn.py", line 57, in forward
    mean, inv_std = self._slave_pipe.run_slave(_ChildMessage(xsum, xsqsum, N))
AttributeError: 'NoneType' object has no attribute 'run_slave'

my environment:

  • Quick Demo has been done (success)

  • version

>>> torch.__version__
'0.5.0a0+32bc28d'
  • only one nvidia card : 1080(8G)

recognition

when i run recognition demo, i

python main.py --dataset cifar10 --model encnetdrop --widen 8 --ncodes 32 --resume model/encnet_cifar.pth.tar --eval

also face an error:

    (9): View()
    (10): Linear(in_features=512, out_features=10, bias=True)
  )
)
Traceback (most recent call last):
  File "main.py", line 181, in <module>
    main()
  File "main.py", line 56, in main
    Dataloader = dataset.Dataloader
AttributeError: module 'dataset.cifar10' has no attribute 'Dataloader'

my environment:

  • torchvision:
>>> import torchvision
>>> torchvision.__version__
'0.2.1'

Can you help me with this problem? Thank you ~

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
zhanghang1989commented, Oct 8, 2018
2reactions
zhanghang1989commented, Jun 29, 2018

I see. The training requires batch size of 16 to reproduce the performance. The code hasn’t considered single gpu case. I will see if it can be fixed easily.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cae/window.py at master · calculix/cae - gui - GitHub
Class to work with master/slave windows. ... https://github.com/python-xlib/python-xlib ... AttributeError: 'NoneType' object has no attribute 'post'.
Read more >
Why Jenkins Slave need java to run slave.jar? - Stack Overflow
Via SSH slave plugin, we can have Jenkins slave to run specific job, but in my understanding, only SSH is enough to execute...
Read more >
2008-November.txt - Python mailing list
Objects have a type, may have attributes, and that's it! ... in <module> print data.group(1) AttributeError: 'NoneType' object has no attribute 'group' Note ......
Read more >
tools - Mercurial repositories - Mozilla
AttributeError : 'NoneType' object has no attribute 'db'", re.M + re.S), - # Ignore errors caused by older buildbot versions on the masters....
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