Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'data' #6

Open
broliao opened this issue Sep 12, 2019 · 1 comment
Open

AttributeError: 'NoneType' object has no attribute 'data' #6

broliao opened this issue Sep 12, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@broliao
Copy link

broliao commented Sep 12, 2019

hi,thank you for your great work,when i run python3 train.py --spasity 0.0001,i get this erro,could you teach me how can I solve it,thanks a lot.

Model Summary: 225 layers, 6.29987e+07 parameters, 457725 gradients

 Epoch   gpu_mem      GIoU       obj       cls     total   targets  img_size

0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "train_with_sparsity.py", line 390, in
train() # transfer-learn yolo biases for 1 epoch
File "train_with_sparsity.py", line 273, in train
updateBN(opt.sparsity, model)
File "train_with_sparsity.py", line 42, in updateBN
m.weight.grad.data.add_(scale*torch.sign(m.weight.data)) # L1
AttributeError: 'NoneType' object has no attribute 'data'

@broliao broliao added the bug Something isn't working label Sep 12, 2019
@sammilei
Copy link

Hi, I encountered the same issue! Did you get it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants