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

Error in SEPFocalLoss #11

Open
Qiang-Feng98 opened this issue Jun 9, 2022 · 0 comments
Open

Error in SEPFocalLoss #11

Qiang-Feng98 opened this issue Jun 9, 2022 · 0 comments

Comments

@Qiang-Feng98
Copy link

Hi, I got an error in SEPFLoss, The input dimensions are 1814400 and 3628800, I don't know how to solve it, can you provide any advice? Thanks!

Traceback (most recent call last):
  File "/home/fqq/Project/15-PyCenterNet/code/tools/train.py", line 189, in <module>
    main()
  File "/home/fqq/Project/15-PyCenterNet/code/tools/train.py", line 178, in main
    train_detector(
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/apis/train.py", line 185, in train_detector
    runner.run(data_loaders, cfg.workflow)
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 128, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 51, in train
    self.run_iter(data_batch, train_mode=True, **kwargs)
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 29, in run_iter
    outputs = self.model.train_step(data_batch, self.optimizer,
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 75, in train_step
    return self.module.train_step(*inputs[0], **kwargs[0])
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/models/detectors/base.py", line 247, in train_step
    losses = self(**data)
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func
    return old_func(*args, **kwargs)
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/models/detectors/base.py", line 181, in forward
    return self.forward_train(img, img_metas, **kwargs)
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/models/detectors/pycenternet_detector.py", line 40, in forward_train
    losses = self.bbox_head.loss(
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/models/dense_heads/pycenternet_head.py", line 1018, in loss
    loss_sem = self.loss_sem(concat_sem_scores, concat_gt_sem_map, concat_gt_sem_weights,
  File "/home/fqq/Anconda/envs/PyCenterNet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/models/losses/focal_loss.py", line 235, in forward
    loss_cls = self.loss_weight * separate_sigmoid_focal_loss(
  File "/home/fqq/Project/15-PyCenterNet/code/mmdet/models/losses/focal_loss.py", line 73, in separate_sigmoid_focal_loss
    pos_pred = pred_sigmoid[pos_inds]
IndexError: The shape of the mask [3628800] at index 0 does not match the shape of the indexed tensor [1814400] at index 0
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