MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / tensor_to_bytes

Function tensor_to_bytes

deepspeed/io/utils.py:19–20  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

17
18
19def tensor_to_bytes(tensor):
20 return tensor.numpy().tobytes()
21
22
23def bytes_to_tensor(buffer):

Callers 1

_unaligned_drainMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected