Closed dwchoo closed 1 month ago
Hi @dwchoo thank you for reporting the issue and submitting a PR, I will check this out!
cc @SangbumChoi
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
transformers
version: 4.45.0.dev0Who can help?
@amyeroberts
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
The official usage example for RT-DETR in the documentation produces incorrect results when
use_focal_loss
is set toFalse
in thepost_process_object_detection
method.Expected behavior
When
use_focal_loss=True
When
use_focal_loss=False
Solved
Fixes a critical bug in the
post_process_object_detection
scores = torch.nn.functional.softmax(out_logits)[:, :, :-1]
->scores = torch.nn.functional.softmax(out_logits,dim-1)