Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/10Ring/LAA-Net
/ _ntuple
Function
_ntuple
register/misc.py:14–21 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
12
13
# From PyTorch internals
14
def
_ntuple(n):
15
16
def
parse(x):
17
if
isinstance(x, collections.abc.Iterable):
18
return
x
19
return
tuple(repeat(x, n))
20
21
return
parse
22
23
24
to_1tuple = _ntuple(1)
Callers
1
misc.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected