Spaces:
Build error
Build error
PeteBleackley commited on
Commit ·
7fe1144
1
Parent(s): 738b546
Fix Einstein summation notation
Browse files
qarac/models/layers/GlobalAttentionPoolingHead.py
CHANGED
|
@@ -66,5 +66,5 @@ class GlobalAttentionPoolingHead(torch.nn.Module):
|
|
| 66 |
dim=2,
|
| 67 |
keepdim=True),EPSILON)
|
| 68 |
lp = loc/nloc
|
| 69 |
-
attention = torch.einsum('ijk,
|
| 70 |
return torch.einsum('ij,ijk->ik',attention,Xa)
|
|
|
|
| 66 |
dim=2,
|
| 67 |
keepdim=True),EPSILON)
|
| 68 |
lp = loc/nloc
|
| 69 |
+
attention = torch.einsum('ijk,ik->ij',lp,gp)
|
| 70 |
return torch.einsum('ij,ijk->ik',attention,Xa)
|