-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactor the baseclass related to transformer #978
Refactor the baseclass related to transformer #978
Conversation
Codecov Report
@@ Coverage Diff @@
## master #978 +/- ##
==========================================
+ Coverage 65.20% 67.50% +2.29%
==========================================
Files 156 159 +3
Lines 10034 10186 +152
Branches 1816 1847 +31
==========================================
+ Hits 6543 6876 +333
+ Misses 3154 2948 -206
- Partials 337 362 +25
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
[Feature]Replace dropout with attn_drop and proj_drop in MultiheadAttention
Support registering FFN of transformer
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.
Just suggestions.
PR Message
This pr refactor the FFN and BaseTransformerLayer.
MultiheadAttention
. withattn_drop
andproj_drop
batch_first
arguments forMultiheadAttention
.MultiScaleDeformableAttention
tommcv/ops/multi_scale_deform_attn.py
so that mmcv can be used without compiling ops.BC-breaking
from mmcv.cnn.bricks.transformer import MultiScaleDeformableAttention
should be changed tofrom mmcv.ops.multi_scale_deform_attn import MultiScaleDeformableAttention