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

Function _subtensor

imperative/python/megengine/functional/nn.py:1449–1456  ·  view source on GitHub ↗
(src, axis, begin, end)

Source from the content-addressed store, hash-verified

1447 channel_x1s_end = c(channels + 1, dtype="int32")
1448
1449 def _subtensor(src, axis, begin, end):
1450 items = ((axis, (begin is not None), (end is not None), False, False),)
1451 args = ()
1452 if begin is not None:
1453 args += (begin,)
1454 if end is not None:
1455 args += (end,)
1456 return f(builtin.Subtensor(items=items), src, *args)
1457
1458 reduce_size = _subtensor(stats, 1, None, c_1)
1459 channel_x1s = _subtensor(stats, 1, c_1, channel_x1s_end)

Callers 1

syncbn_split_statsFunction · 0.70

Calls 2

SubtensorMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected