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

RuntimeError while running CenterNet on visdrone training set on ctdet task CUDA9.0 pytorch 1.1.0 #885

Closed
cnr0724 opened this issue Mar 11, 2021 · 1 comment

Comments

@cnr0724
Copy link

cnr0724 commented Mar 11, 2021

When I try to train CenterNet, I get the error like this.

File "main.py" line 102, in
main(opt)
File "main.py", line 70, in main
log_dict_train, _ = trainer.train(epoch, train_loader)
File "/root/CenterNet/src/lib/trains/base_trainer.py", line 119, in train
return self.run_epoch('train', epoch, data_loader)
File "/root/CenterNet/src/lib/trains/base_trainer.py", line 69, in run_epoch
output,loss,loss_stats = model_with_loss(batch)
File "/root/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/nn/modules/module.py" , line 493, in call
result = self.forward(*input, **kwargs)
File "/root/CenterNet/src/lib/trains/base_trainer.py", line 19, in forward
outputs= self.model(batch['input'])
File "/root/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/nn/modules/module.py" , line 493, in call
result = self.forward(*input, **kwargs)
File "/root/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 474, in forward
x = self.base(x)
File "/root/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/nn/modules/module.py" , line 493, in call
result = self.forward(*input, **kwargs)
File "/root/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 293, in forward
x = getattr(self, 'level{}'.format(i))(x)
File "/root/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/nn/modules/module.py" , line 493, in call
result = self.forward(*input, **kwargs)
File "/root/CenterNet/src/lib/models/networks/pose_dla_dcn.py",line 217, in forward
x1 = self.tree1(x, residual)
File "/root/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/nn/modules/module.py" , line 493, in call
result = self.forward(*input, **kwargs)
File "/root/CenterNet/src/lib/models/networks/pose_dla_dcn.py",line 217, in forward
x1 = self.tree1(x, residual)
File "/root/anaconda3/envs/CenterNet/lib/python3.6/site-packages/torch/nn/modules/module.py" , line 493, in call
result = self.forward(*input, **kwargs)
File "/root/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 59, in forward
out += residual
RuntimeError: The size of tensor a (68) must match the size of tensor b (67) at non-singleton dimension 3

I tried to reshape the tensor to solve the runtimeError but it didn't work. (Another error telling that the shapes of the out tensor and the residual tensor are different occured.) What should I do in order to make it work?

@cnr0724 cnr0724 changed the title RuntimeError while running CenterNet on visdrone training set CUDA9.0 pytorch 1.1.0 RuntimeError while running CenterNet on visdrone training set on ctdet task CUDA9.0 pytorch 1.1.0 Mar 11, 2021
@cnr0724 cnr0724 closed this as completed Mar 15, 2021
@idantony
Copy link

idantony commented Dec 6, 2021

How do you fix this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants