Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TEA-Lab/TwoByTwo
/ clones
Function
clones
src/shape_assembly/models/train/transformer.py:8–9 ·
view source on GitHub ↗
(module, N)
Source
from the content-addressed store, hash-verified
6
import
pytorch_lightning
as
pl
7
8
def
clones(module, N):
9
return
nn.ModuleList([copy.deepcopy(module)
for
_ in range(N)])
10
11
def
attention(query, key, value, mask=None):
12
d_k = query.size(-1)
Callers
5
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected