MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / expand_hw

Function expand_hw

imperative/python/megengine/functional/nn.py:115–121  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

113
114
115def expand_hw(x):
116 # judge int is 5 times faster than judge Sequence
117 if isinstance(x, int):
118 return x, x
119 if isinstance(x, Sequence):
120 return int(x[0]), int(x[1])
121 return int(x), int(x)
122
123
124def expand_dhw(x):

Callers 9

conv2dFunction · 0.85
conv_transpose2dFunction · 0.85
deformable_conv2dFunction · 0.85
local_conv2dFunction · 0.85
max_pool2dFunction · 0.85
avg_pool2dFunction · 0.85
sliding_windowFunction · 0.85
sliding_window_transposeFunction · 0.85
region_restricted_convFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected