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

Function _shuffle

imperative/python/megengine/random/rng.py:260–264  ·  view source on GitHub ↗
(inp: Tensor, seed: int, handle: int)

Source from the content-addressed store, hash-verified

258
259
260def _shuffle(inp: Tensor, seed: int, handle: int) -> Tensor:
261 assert inp.size > 0, "size needs to be greater than 0"
262 op = ShuffleRNG(seed=seed, handle=handle)
263 output, _ = apply(op, inp)
264 return output
265
266
267def _exponential(

Callers 2

permutationMethod · 0.85
shuffleMethod · 0.85

Calls 1

applyFunction · 0.50

Tested by

no test coverage detected