MCPcopy Create free account
hub / github.com/cwitkowitz/amt-tools / array_to_tensor

Function array_to_tensor

amt_tools/tools/utils.py:3438–3465  ·  view source on GitHub ↗

Simple helper function to convert a NumPy array into a PyTorch tensor in order to keep code readable. Parameters ---------- data : NumPy ndarray Array to convert to tensor device : string, or None (optional) Add tensor to this device, if specified Returns

(data, device=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

dict_to_tensorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected