MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / validation_step

Method validation_step

sat/vae_modules/autoencoder.py:310–315  ·  view source on GitHub ↗
(self, batch: dict, batch_idx: int)

Source from the content-addressed store, hash-verified

308 opt.step()
309
310 def validation_step(self, batch: dict, batch_idx: int) -> Dict:
311 log_dict = self._validation_step(batch, batch_idx)
312 with self.ema_scope():
313 log_dict_ema = self._validation_step(batch, batch_idx, postfix="_ema")
314 log_dict.update(log_dict_ema)
315 return log_dict
316
317 def _validation_step(self, batch: dict, batch_idx: int, postfix: str = "") -> Dict:
318 x = self.get_input(batch)

Callers

nothing calls this directly

Calls 3

_validation_stepMethod · 0.95
ema_scopeMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected