(self, epoch, i, errors, t)
| 101 | |
| 102 | # errors: same format as |errors| of plotCurrentErrors |
| 103 | def print_current_errors(self, epoch, i, errors, t): |
| 104 | message = '(epoch: %d, iters: %d, time: %.3f) ' % (epoch, i, t) |
| 105 | for k, v in sorted(errors.items()): |
| 106 | if v != 0: |
| 107 | message += '%s: %.3f ' % (k, v) |
| 108 | |
| 109 | print(message) |
| 110 | with open(self.log_name, "a") as log_file: |
| 111 | log_file.write('%s\n' % message) |
| 112 | |
| 113 | # save image to the disk |
| 114 | def save_images(self, image_dir, visuals, image_path, webpage=None): |