MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / load

Method load

tensorpack/dataflow/serialize.py:173–184  ·  view source on GitHub ↗

Args: size (int): total number of records. If not provided, the returned dataflow will have no `__len__()`. It's needed because this metadata is not stored in the TFRecord file.

(path, size=None)

Source from the content-addressed store, hash-verified

171
172 @staticmethod
173 def load(path, size=None):
174 """
175 Args:
176 size (int): total number of records. If not provided, the returned dataflow will have no `__len__()`.
177 It's needed because this metadata is not stored in the TFRecord file.
178 """
179 gen = tf.python_io.tf_record_iterator(path)
180 ds = DataFromGenerator(gen)
181 ds = MapData(ds, loads)
182 if size is not None:
183 ds = FixedSizeData(ds, size)
184 return ds
185
186
187class HDF5Serializer():

Callers

nothing calls this directly

Calls 3

DataFromGeneratorClass · 0.85
MapDataClass · 0.85
FixedSizeDataClass · 0.85

Tested by

no test coverage detected