MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / encode_resource_handle

Function encode_resource_handle

tensorflow/python/ops/session_ops.py:36–39  ·  view source on GitHub ↗

Encode a ResourceHandle proto as custom numpy struct type.

(resource_handle)

Source from the content-addressed store, hash-verified

34
35
36def encode_resource_handle(resource_handle):
37 """Encode a ResourceHandle proto as custom numpy struct type."""
38 return np.asarray(bytearray(resource_handle.SerializeToString()),
39 dtype=dtypes.np_resource)
40
41
42class TensorHandle(object):

Callers 1

to_numpy_arrayMethod · 0.85

Calls 1

SerializeToStringMethod · 0.45

Tested by

no test coverage detected