MCPcopy Create free account
hub / github.com/ChinaYi/ASFormer / exponential_descrease

Function exponential_descrease

model.py:14–15  ·  view source on GitHub ↗
(idx_decoder, p=3)

Source from the content-addressed store, hash-verified

12device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
14def exponential_descrease(idx_decoder, p=3):
15 return math.exp(-p*idx_decoder)
16
17class AttentionHelper(nn.Module):
18 def __init__(self):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected