Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NJUNLP/GTS
/ clones
Function
clones
code/NNModel/attention_module.py:21–23 ·
view source on GitHub ↗
Produce N identical layers.
(module, N)
Source
from the content-addressed store, hash-verified
19
20
21
def
clones(module, N):
22
"Produce N identical layers."
23
return
torch.nn.ModuleList([copy.deepcopy(module)
for
_ in range(N)])
24
25
26
class
MultiHeadedAttention(torch.nn.Module):
Callers
1
__init__
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected