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

Function read32

tensorflow/lite/tutorials/dataset.py:35–38  ·  view source on GitHub ↗

Read 4 bytes from bytestream as an unsigned 32-bit integer.

(bytestream)

Source from the content-addressed store, hash-verified

33
34
35def read32(bytestream):
36 """Read 4 bytes from bytestream as an unsigned 32-bit integer."""
37 dt = np.dtype(np.uint32).newbyteorder('>')
38 return np.frombuffer(bytestream.read(4), dtype=dt)[0]
39
40
41def check_image_file_header(filename):

Callers 2

check_image_file_headerFunction · 0.85
check_labels_file_headerFunction · 0.85

Calls 2

dtypeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected