fix auxiliary loss training in DetrSegmentation#28354
Conversation
amyeroberts
left a comment
There was a problem hiding this comment.
Thanks for fixing!
Could you add a test which makes sure this code path is now reached?
|
@amyeroberts Hi back again with the test!
BTW, this test will also check in not only segmentation but also object_detection_model! following result is the pytest of detr |
amyeroberts
left a comment
There was a problem hiding this comment.
@SangbumChoi Thanks for adding and running the tests - looks great!
Could you add these tests to the other DETR-related modes too (if not already covered)?:
- conditional DETR
- deformable DETR
- DETA
- Table Transformer
- Yolos
- Maskformer
|
@amyeroberts No problem! However, should I make another PR or just modify in this PR? |
|
@SangbumChoi Up to you. I'd suggest making a follow-up PR to prevent holding this one up, but happy to go for whatever you'd prefer |
|
@amyeroberts Yeah, I will make follow-up PR and link this PR also. If there's nothing else to add for this topic, let's MERGE this first :) |
|
@SangbumChoi Merged! Thanks again for this contribution 💪 |
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
Hi, @amyeroberts. I fixed the training error when setting auxiliary loss to set 'True'
outputs_class = self.detr.class_embed(hs)Since original DETR does not have their own class of self.class_labels_classifier, we have to import from self.detr
see https://github.com/facebookresearch/detr/blob/3af9fa878e73b6894ce3596450a8d9b89d918ca9/models/segmentation.py#L49