We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我在运行train.py时出现了以下报错: Traceback (most recent call last): File "train.py", line 152, in train(net, train_loader, loss_dict, optimizer, scheduler,logger, epoch, metric_dict, cfg.use_aux) File "train.py", line 68, in train loss = calc_loss(loss_dict, results, logger, global_step) File "train.py", line 47, in calc_loss loss_cur = loss_dict['op']i File "D:\anaconda\envs\lane\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "D:\anaconda\envs\lane\lib\site-packages\torch\nn\modules\loss.py", line 1176, in forward label_smoothing=self.label_smoothing) File "D:\anaconda\envs\lane\lib\site-packages\torch\nn\functional.py", line 3026, in cross_entropy return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing) RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of size: : [32, 36, 100, 3]
The text was updated successfully, but these errors were encountered:
chane the use_aux to False can work: parser.add_argument('--use_aux', default='False', type=str2bool)
Sorry, something went wrong.
我也遇到了这个问题,应该是因为CULane的seg label是个1通道的png,我的数据集的seg label是个3通道的,调整一下label维度就好了
怎么调整这个维度
No branches or pull requests
我在运行train.py时出现了以下报错:
Traceback (most recent call last):
File "train.py", line 152, in
train(net, train_loader, loss_dict, optimizer, scheduler,logger, epoch, metric_dict, cfg.use_aux)
File "train.py", line 68, in train
loss = calc_loss(loss_dict, results, logger, global_step)
File "train.py", line 47, in calc_loss
loss_cur = loss_dict['op']i
File "D:\anaconda\envs\lane\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\anaconda\envs\lane\lib\site-packages\torch\nn\modules\loss.py", line 1176, in forward
label_smoothing=self.label_smoothing)
File "D:\anaconda\envs\lane\lib\site-packages\torch\nn\functional.py", line 3026, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of size: : [32, 36, 100, 3]
The text was updated successfully, but these errors were encountered: