(query, keys)
| 225 | |
| 226 | @staticmethod |
| 227 | def dotprod(query, keys): |
| 228 | # query: (batch, beams, dim) |
| 229 | # keys: (batch, 1, time, dim) |
| 230 | # returns: (batch, beams, time) |
| 231 | return torch.sum((query.unsqueeze(-2) * keys), dim=-1) |
| 232 | |
| 233 | |
| 234 | @staticmethod |
nothing calls this directly
no outgoing calls
no test coverage detected