MCPcopy Create free account
hub / github.com/ali-vilab/ACE_plus / run_step_val

Method run_step_val

modules/ace_plus_solver.py:79–89  ·  view source on GitHub ↗
(self, batch_data, batch_idx=0, step=None, rank=None)

Source from the content-addressed store, hash-verified

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 = [], []

Callers

nothing calls this directly

Calls 1

forward_trainMethod · 0.80

Tested by

no test coverage detected