-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for PETR Model(Vovnet based varaints) #1229
base: main
Are you sure you want to change the base?
Conversation
e4c36c7
to
8685b61
Compare
|
|
1 similar comment
|
|
8685b61
to
16b18b8
Compare
|
|
1 similar comment
|
|
16b18b8
to
cc76216
Compare
|
1 similar comment
|
|
1 similar comment
|
4c75292
to
5cb5f67
Compare
|
1 similar comment
|
|
1 similar comment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @kamalrajkannan78 . Here are few refactoring comments.
72a317d
to
83a869f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for adding the support @kamalrajkannan78
|
|
|
|
forge/test/models/pytorch/vision/petr/mmdet/datasets/pipelines/loading.py
Outdated
Show resolved
Hide resolved
forge/test/models/pytorch/vision/petr/mmdet/models/losses/focal_loss.py
Outdated
Show resolved
Hide resolved
forge/test/models/pytorch/vision/petr/mmdet/models/losses/smooth_l1_loss.py
Outdated
Show resolved
Hide resolved
forge/test/models/pytorch/vision/petr/mmdet/models/losses/smooth_l1_loss.py
Outdated
Show resolved
Hide resolved
f07ec56
to
121c959
Compare
|
1 similar comment
|
|
1 similar comment
|
@ashokkumarkannan1 @vkovinicTT @nvukobratTT
|
121c959
to
8ac9fff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there are ton on new files that are mostly dependeon on third-party GitHub code, let's wait with this one a bit before we set a system for these kind of models.
More precisely, we're in discussion of having separate repository to host this king of models. Therefore, can we mark this PR as draft, until we get new repository set up?
Once that's done, we can push further this model with much less code on FFE side.
What you think @kamalrajkannan78 ?
Marked the PR as draft . |
Summary :
This PR adds support for PETR's vovnet based variants #955
The following modifications have been made to the model code:
forge/test/models/pytorch/vision/petr/utils/petr_head.py
, following in-place operations are replaced with out-of-place operations using torch.cat to avoid pcc dropforge/test/models/pytorch/vision/petr/utils/petr_transformer.py
, zeros_like op replaced with zeros op on this line to avoid below issue Attribute error in detr #1094forge/test/models/pytorch/vision/petr/utils/petr_head.py
, this mask creation line leads to below correlation pattern after this operation which ultimately leads to pcc drop. since the mask is derived from shape information rather than actual tensor values, the issue was unable to reproduce using sanity test which leads toAssertionError: There should only be one tt function
. To mitigate this, the mask creation was moved outside the model and is now passed as an input to model, resolving below issue.Note:
Logs