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: size mismatch, m1: [128 x 2048], m2: [4096 x 1024] at /opt/conda/conda-bld/pytorch_1524586445097/work/aten/src/THC/generic/THCTensorMathBlas.cu:249 #9

Open
jiajialin opened this issue May 15, 2019 · 1 comment

Comments

@jiajialin
Copy link

Traceback (most recent call last):
File "da_trainval_net.py", line 398, in
tgt_im_data, tgt_im_info, tgt_gt_boxes, tgt_num_boxes, tgt_need_backprop)
File "/home/youlin/local/anaconda3/envs/da-faster-rcnn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/youlin/pytorch-proj/da-faster-rcnn-PyTorch/lib/model/da_faster_rcnn/faster_rcnn.py", line 187, in forward
instance_sigmoid, same_size_label = self.RCNN_instanceDA(pooled_feat, need_backprop)
File "/home/youlin/local/anaconda3/envs/da-faster-rcnn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/youlin/pytorch-proj/da-faster-rcnn-PyTorch/lib/model/da_faster_rcnn/DA.py", line 69, in forward
x=self.dc_drop1(self.dc_relu1(self.dc_ip1(x)))
File "/home/youlin/local/anaconda3/envs/da-faster-rcnn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/youlin/local/anaconda3/envs/da-faster-rcnn/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 55, in forward
return F.linear(input, self.weight, self.bias)
File "/home/youlin/local/anaconda3/envs/da-faster-rcnn/lib/python3.6/site-packages/torch/nn/functional.py", line 992, in linear
return torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [128 x 2048], m2: [4096 x 1024] at /opt/conda/conda-bld/pytorch_1524586445097/work/aten/src/THC/generic/THCTensorMathBlas.cu:249

Hi, i met this problem when i use the cityscape dataset.
the command is:
CUDA_VISIBLE_DEVICES=0 python da_trainval_net.py --dataset cityscape --net vgg16 --bs 1 --lr 2e-3 --lr_decay_step 6 --cuda --net res101

who can help me! Thanks!

@benedictflorance
Copy link

Hey, you are giving --net as vgg16 as well as --net as renet101. Set a single network configuration.

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