MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / torch_to_numpy

Function torch_to_numpy

mogen/utils/misc.py:12–14  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

10
11
12def torch_to_numpy(x):
13 assert isinstance(x, torch.Tensor)
14 return x.detach().cpu().numpy()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected