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
Fix TFDebertaV2ConvLayer in TFDebertaV2Model #16031
Fix TFDebertaV2ConvLayer in TFDebertaV2Model #16031
Conversation
@@ -313,7 +313,7 @@ def call( | |||
rmask = tf.cast(1 - input_mask, tf.bool) | |||
out = tf.where(tf.broadcast_to(tf.expand_dims(rmask, -1), shape_list(out)), 0.0, out) | |||
out = self.dropout(out, training=training) | |||
hidden_states = self.conv_act(out) | |||
out = self.conv_act(out) |
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.
This is the main place being fixed
|
||
output_states = output * mask | ||
output_states = output * input_mask |
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.
Think this is the correct logic.
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 a lot for fixing, LGTM!
The documentation is not available anymore as the PR was closed or merged. |
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.
🔥
What does this PR do?
Fix a CI failure for TFDebertaV2Model, caused by the mistake in
TFDebertaV2ConvLayer
.Remark
This test
test_inference_no_head
also fails with the version in #13120. I think this slow test was not run manually to ensure it works before being merged to master.Code to demonstrate the issue and the effect of this PR
This is adapted from test_inference_no_head
This scripts gives
Before this PR
With this PR: