MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / __init__

Method __init__

rat-sql-gap/seq2struct/models/attention.py:20–23  ·  view source on GitHub ↗
(self, pointer)

Source from the content-addressed store, hash-verified

18
19class Attention(torch.nn.Module):
20 def __init__(self, pointer):
21 super().__init__()
22 self.pointer = pointer
23 self.softmax = torch.nn.Softmax(dim=-1)
24
25 def forward(self, query, values, attn_mask=None):
26 # query shape: batch x query_size

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected