Simple `Action` that just saves the outputs passed to `__call__`.
| 793 | checkpoint_interval=10) |
| 794 | |
| 795 | class OutputRecorderAction: |
| 796 | """Simple `Action` that just saves the outputs passed to `__call__`.""" |
| 797 | |
| 798 | def __init__(self): |
| 799 | self.outputs = [] |
| 800 | |
| 801 | def __call__(self, output): |
| 802 | self.outputs.append(output) |
| 803 | |
| 804 | train_output_recorder = OutputRecorderAction() |
| 805 | eval_output_recorder = OutputRecorderAction() |