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

Method load

tensorpack/dataflow/serialize.py:108–115  ·  view source on GitHub ↗

Note: If you found deserialization being the bottleneck, you can use :class:`LMDBData` as the reader and run deserialization as a mapper in parallel.

(path, shuffle=True)

Source from the content-addressed store, hash-verified

106
107 @staticmethod
108 def load(path, shuffle=True):
109 """
110 Note:
111 If you found deserialization being the bottleneck, you can use :class:`LMDBData` as the reader
112 and run deserialization as a mapper in parallel.
113 """
114 df = LMDBData(path, shuffle=shuffle)
115 return MapData(df, LMDBSerializer._deserialize_lmdb)
116
117 @staticmethod
118 def _deserialize_lmdb(dp):

Callers 5

run_write_read_testMethod · 0.45
loadMethod · 0.45
serialize.pyFile · 0.45
read_cifarFunction · 0.45
_parse_metaFunction · 0.45

Calls 2

LMDBDataClass · 0.85
MapDataClass · 0.85

Tested by 1

run_write_read_testMethod · 0.36