(self, batch_data, batch_idx=0, step=None, rank=None)
| 77 | self.after_all_iter(self.hooks_dict[self._mode]) |
| 78 | |
| 79 | def run_step_val(self, batch_data, batch_idx=0, step=None, rank=None): |
| 80 | sample_id_list = batch_data['sample_id'] |
| 81 | loss_dict = {} |
| 82 | with torch.autocast(device_type='cuda', |
| 83 | enabled=self.use_amp, |
| 84 | dtype=self.dtype): |
| 85 | results = self.model.forward_train(**batch_data) |
| 86 | loss = results['loss'] |
| 87 | for sample_id in sample_id_list: |
| 88 | loss_dict[sample_id] = loss.detach().cpu().numpy() |
| 89 | return loss_dict |
| 90 | |
| 91 | def save_results(self, results): |
| 92 | log_data, log_label = [], [] |
nothing calls this directly
no test coverage detected