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: Given groups=1, weight of size [768, 3, 16, 16], expected input[1, 1, 256, 192] to have 3 channels, but got 1 channels instead #13

Open
mxyqsh opened this issue Jun 6, 2023 · 0 comments

Comments

@mxyqsh
Copy link

mxyqsh commented Jun 6, 2023

#========= [Train Configs] =========#
# - Num GPUs: 1
# - Batch size (per gpu): 1
# - LR:  0.000063
# - Num params: 89,994,513
# - AMP: True
#===================================# 

🏋️> Epoch [000/210] | Loss 0.0014 | LR 0.000006 | Step: 0%| | 51/149813 [00:08<6:55:19, 6.01it/s]]
Traceback (most recent call last):
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/train.py", line 163, in
main()
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/train.py", line 150, in main
train_model(
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/utils/train_valid_fn.py", line 131, in train_model
outputs = model(images)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/models/model.py", line 24, in forward
return self.keypoint_head(self.backbone(x))
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/models/backbone/vit.py", line 399, in forward
x = self.forward_features(x)
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/models/backbone/vit.py", line 379, in forward_features
x, (Hp, Wp) = self.patch_embed(x)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/mxy/workspace/ViTPose_pytorch/models/backbone/vit.py", line 226, in forward
x = self.proj(x)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 457, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/ubuntu/anaconda3/envs/vitpose/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 453, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [768, 3, 16, 16], expected input[1, 1, 256, 192] to have 3 channels, but got 1 channels instead

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