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

Varying the number of input channels #887

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

Varying the number of input channels #887

cnr0724 opened this issue Mar 12, 2021 · 1 comment

Comments

@cnr0724
Copy link

cnr0724 commented Mar 12, 2021

Firstly, thanks for the great work.
When I try to run Centernet with custom data, channel number change is required.
Any help would be appreciated.

@cnr0724
Copy link
Author

cnr0724 commented Mar 15, 2021

Traceback (most recent call last):
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/lib/python3.7/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/lib/python3.7/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 481, in forward
x = self.base(x)
File "/root/anaconda3/lib/python3.7/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 300, in forward
x = getattr(self, 'level{}'.format(i))(x)
File "/root/anaconda3/lib/python3.7/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 227, in forward
x = self.root(x2, x1, *children)
File "/root/anaconda3/lib/python3.7/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 169, in forward
x = self.conv(torch.cat(x, 3))
File "/root/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 338, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size 64 128 1 1, expected input[2, 64, 480, 540] to have 128 channels, but got 64 channels instead

This error happens.

@cnr0724 cnr0724 closed this as completed Mar 16, 2021
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

1 participant