MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / _ntuple

Function _ntuple

SwissArmyTransformer/examples/yolos/models/layers/helper.py:10–15  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

8
9# From PyTorch internals
10def _ntuple(n):
11 def parse(x):
12 if isinstance(x, container_abcs.Iterable):
13 return x
14 return tuple(repeat(x, n))
15 return parse
16
17
18to_1tuple = _ntuple(1)

Callers 1

helper.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected