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

Function concat_dims

imperative/python/megengine/functional/einsum.py:432–439  ·  view source on GitHub ↗
(dims)

Source from the content-addressed store, hash-verified

430 return reduce(lambda x, y: f("*", x, y), map(dim2val, dims))
431
432 def concat_dims(dims):
433 if len(dims) == 0:
434 return c([1], dtype=np.int32, device=device)
435 else:
436 shape = dims[0]
437 for dim in dims[1:]:
438 shape = f(builtin.Concat(axis=0, comp_node=device), shape, dim)
439 return shape
440
441 def reduce_sum(x, axis):
442 if len(axis) == 0:

Callers 1

einsumFunction · 0.85

Calls 2

ConcatMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected