zR
commited on
Commit
·
9a7a028
1
Parent(s):
8ba56be
use reshape
Browse files
visual.py
CHANGED
|
@@ -70,7 +70,7 @@ class Attention(nn.Module):
|
|
| 70 |
out = attention_fn_default(
|
| 71 |
q, k, v
|
| 72 |
)
|
| 73 |
-
output = self.dense(out.transpose(1, 2).
|
| 74 |
output = self.output_dropout(output)
|
| 75 |
return output
|
| 76 |
|
|
|
|
| 70 |
out = attention_fn_default(
|
| 71 |
q, k, v
|
| 72 |
)
|
| 73 |
+
output = self.dense(out.transpose(1, 2).reshape(B, L, -1))
|
| 74 |
output = self.output_dropout(output)
|
| 75 |
return output
|
| 76 |
|