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

Method catch

tensorpack/dataflow/image.py:35–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33
34 @contextmanager
35 def catch(self):
36 try:
37 yield
38 except Exception:
39 self._nr_error += 1
40 if not self.catch_exceptions:
41 raise
42 else:
43 if self._nr_error % 100 == 0 or self._nr_error < 10:
44 logger.exception("Got {} augmentation errors.".format(self._nr_error))
45
46
47class ImageFromFile(RNGDataFlow):

Callers 3

_aug_mapperMethod · 0.80
_aug_mapperMethod · 0.80
_aug_mapperMethod · 0.80

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected