MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / __init__

Method __init__

cldm/logger.py:13–26  ·  view source on GitHub ↗
(self, batch_frequency=2000, max_images=4, clamp=True, increase_log_steps=True,
                 rescale=True, disabled=False, log_on_batch_idx=False, log_first_step=False,
                 log_images_kwargs=None)

Source from the content-addressed store, hash-verified

11
12class ImageLogger(Callback):
13 def __init__(self, batch_frequency=2000, max_images=4, clamp=True, increase_log_steps=True,
14 rescale=True, disabled=False, log_on_batch_idx=False, log_first_step=False,
15 log_images_kwargs=None):
16 super().__init__()
17 self.rescale = rescale
18 self.batch_freq = batch_frequency
19 self.max_images = max_images
20 if not increase_log_steps:
21 self.log_steps = [self.batch_freq]
22 self.clamp = clamp
23 self.disabled = disabled
24 self.log_on_batch_idx = log_on_batch_idx
25 self.log_images_kwargs = log_images_kwargs if log_images_kwargs else {}
26 self.log_first_step = log_first_step
27
28 @rank_zero_only
29 def log_local(self, save_dir, split, images, global_step, current_epoch, batch_idx):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected