The official implementation of Equalization Loss v1 & v2 (CVPR 2020, 2021) based on MMDetection. https://arxiv.org/abs/2012.08548 https://arxiv.org/abs/2003.05176
Apache License 2.0
158
stars
23
forks
source link
RuntimeError: The expanded size of the tensor (501) must match the existing size (1204) at non-singleton dimension 1. #26
作者大大您好,我在使用4个gpu按照您项目的配置使用eqlv2去训练openimage时,报错显示如下信息
File "/public/software/apps/DeepLearning/Python3.7.12/torch1.10-dtk22.04.2-build/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, *kwargs)return forward_call(input, **kwargs)
File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 72, in forward
File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 72, in forward
pos_w, neg_w = self.get_weight(cls_score)
File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 115, in get_weight
neg_w = neg_w.view(1, -1).expand(self.n_i, self.n_c)
RuntimeError: The expanded size of the tensor (501) must match the existing size (1204) at non-singleton dimension 1. Target sizes: [1024, 501]. Tensor sizes: [1, 1204]
pos_w, neg_w = self.get_weight(cls_score)
File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 115, in get_weight
neg_w = neg_w.view(1, -1).expand(self.n_i, self.n_c)
RuntimeError: The expanded size of the tensor (501) must match the existing size (1204) at non-singleton dimension 1. Target sizes: [1024, 501]. Tensor sizes: [1, 1204],请问您是否可以帮助我
作者大大您好,我在使用4个gpu按照您项目的配置使用eqlv2去训练openimage时,报错显示如下信息 File "/public/software/apps/DeepLearning/Python3.7.12/torch1.10-dtk22.04.2-build/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, *kwargs)return forward_call(input, **kwargs)
File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 72, in forward File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 72, in forward pos_w, neg_w = self.get_weight(cls_score) File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 115, in get_weight neg_w = neg_w.view(1, -1).expand(self.n_i, self.n_c) RuntimeError: The expanded size of the tensor (501) must match the existing size (1204) at non-singleton dimension 1. Target sizes: [1024, 501]. Tensor sizes: [1, 1204] pos_w, neg_w = self.get_weight(cls_score) File "/public/home/taoy/eqlv2-master/mmdet/models/losses/eqlv2.py", line 115, in get_weight neg_w = neg_w.view(1, -1).expand(self.n_i, self.n_c) RuntimeError: The expanded size of the tensor (501) must match the existing size (1204) at non-singleton dimension 1. Target sizes: [1024, 501]. Tensor sizes: [1, 1204],请问您是否可以帮助我