MCPcopy
hub / github.com/PaddlePaddle/PaddleOCR / test_reader

Function test_reader

tools/train.py:276–293  ·  view source on GitHub ↗
(config, device, logger)

Source from the content-addressed store, hash-verified

274
275
276def test_reader(config, device, logger):
277 loader = build_dataloader(config, "Train", device, logger)
278 import time
279
280 starttime = time.time()
281 count = 0
282 try:
283 for data in loader():
284 count += 1
285 if count % 1 == 0:
286 batch_time = time.time() - starttime
287 starttime = time.time()
288 logger.info(
289 "reader: {}, {}, {}".format(count, len(data[0]), batch_time)
290 )
291 except Exception as e:
292 logger.info(e)
293 logger.info("finish reader: {}, Success!".format(count))
294
295
296if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

build_dataloaderFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…