MCPcopy Create free account
hub / github.com/Monalissaa/DisenDiff / _testtube

Method _testtube

train.py:537–545  ·  view source on GitHub ↗
(self, pl_module, images, batch_idx, split)

Source from the content-addressed store, hash-verified

535
536 @rank_zero_only
537 def _testtube(self, pl_module, images, batch_idx, split):
538 for k in images:
539 grid = torchvision.utils.make_grid(images[k])
540 grid = (grid + 1.0) / 2.0 # -1,1 -> 0,1; c,h,w
541
542 tag = f"{split}/{k}"
543 pl_module.logger.experiment.add_image(
544 tag, grid,
545 global_step=pl_module.global_step)
546
547 @rank_zero_only
548 def log_local(self, save_dir, split, images,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected