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

Function _subtensor

imperative/python/megengine/module/vision.py:274–281  ·  view source on GitHub ↗
(src, axis, begin, end)

Source from the content-addressed store, hash-verified

272 c_3 = c(3, dtype="int32")
273
274 def _subtensor(src, axis, begin, end):
275 items = ((axis, (begin is not None), (end is not None), False, False),)
276 args = ()
277 if begin is not None:
278 args += (begin,)
279 if end is not None:
280 args += (end,)
281 return f(builtin.Subtensor(items=items), src, *args)
282
283 def _kernel_init(x):
284 k_1 = _subtensor(x, 0, None, c_1)

Callers 1

_kernel_initFunction · 0.70

Calls 2

SubtensorMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected