MCPcopy Create free account
hub / github.com/microsoft/Cream / _ntuple

Function _ntuple

AutoFormer/model/utils.py:64–69  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

62 return _no_grad_trunc_normal_(tensor, mean, std, a, b)
63
64def _ntuple(n):
65 def parse(x):
66 if isinstance(x, container_abcs.Iterable):
67 return x
68 return tuple(repeat(x, n))
69 return parse
70
71def drop_path(x, drop_prob: float = 0., training: bool = False):
72 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).

Callers 1

utils.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected