MCPcopy Create free account
hub / github.com/adobe-research/custom-diffusion / _testtube

Method _testtube

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

Source from the content-addressed store, hash-verified

512
513 @rank_zero_only
514 def _testtube(self, pl_module, images, batch_idx, split):
515 for k in images:
516 grid = torchvision.utils.make_grid(images[k])
517 grid = (grid + 1.0) / 2.0 # -1,1 -> 0,1; c,h,w
518
519 tag = f"{split}/{k}"
520 pl_module.logger.experiment.add_image(
521 tag, grid,
522 global_step=pl_module.global_step)
523
524 @rank_zero_only
525 def log_local(self, save_dir, split, images,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected