(self)
| 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 | |
| 47 | class ImageFromFile(RNGDataFlow): |
no test coverage detected