Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
12
device = torch.device(
"cuda"
if
torch.cuda.is_available()
else
"cpu"
)
13
14
def
exponential_descrease(idx_decoder, p=3):
15
return
math.exp(-p*idx_decoder)
16
17
class
AttentionHelper(nn.Module):
18
def
__init__(self):
Callers
1
__init__
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected