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

Function restore

imperative/python/megengine/functional/math.py:647–650  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

645 tns, ind = apply(op, reshaped)
646
647 def restore(tensor):
648 unreshaped = tensor.reshape(transposed_shape)
649 untransposed = swapaxes(unreshaped, dim, -1)
650 return untransposed
651
652 return restore(tns), restore(ind)
653

Callers 1

sortFunction · 0.85

Calls 2

swapaxesFunction · 0.85
reshapeMethod · 0.45

Tested by

no test coverage detected