(self, check_idx)
| 498 | |
| 499 | # The function checks if it's time to log an image batch |
| 500 | def check_frequency(self, check_idx): |
| 501 | if ((check_idx % self.batch_freq) == 0 or (check_idx in self.log_steps)) and ( |
| 502 | check_idx > 0 or self.log_first_step |
| 503 | ): |
| 504 | try: |
| 505 | self.log_steps.pop(0) |
| 506 | except IndexError as e: |
| 507 | print(e) |
| 508 | return True |
| 509 | return False |
| 510 | |
| 511 | # Log images on train batch end if logging is not disabled |
| 512 | def on_train_batch_end(self, trainer, pl_module, outputs, batch, batch_idx): |