MCPcopy Create free account
hub / github.com/NVIDIA/DALI / SampleMeta

Class SampleMeta

dali/python/nvidia/dali/_multiproc/shared_batch.py:110–123  ·  view source on GitHub ↗

Metadata describing serialized sample in a memory buffer. It is passed through memory, stored after sample it describes.

Source from the content-addressed store, hash-verified

108
109
110class SampleMeta:
111 """Metadata describing serialized sample in a memory buffer.
112
113 It is passed through memory, stored after sample it describes."""
114
115 def __init__(self, offset, shape, dtype, nbytes):
116 self.shape = shape
117 self.dtype = dtype
118 self.offset = offset
119 self.nbytes = nbytes
120
121 @classmethod
122 def from_np(cls, offset, np_array):
123 return cls(offset, np_array.shape, np_array.dtype, np_array.nbytes)
124
125
126class SharedBatchMeta:

Callers 1

make_metaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected