GANImageLogger
- class easypl.callbacks.loggers.image_gan.GANImageLogger(phase: str = 'train', max_samples: int = 1, mode: str = 'first', sample_key: Optional = None, score_func: Optional[Callable] = None, largest: bool = True, dir_path: Optional[str] = None, save_on_disk: bool = False, dpi=100)
Callback class for logging images in gan task
- phase
Phase which will be used by this Logger. Available: [“train”, “val”, “test”, “predict”].
- Type
str
- max_samples
Maximum number of samples which will be logged at one epoch.
- Type
int
- mode
Mode of sample generation. Available modes: [“random”, “first”, “top”].
- Type
str
- sample_key
Key of batch, which define sample. If None, then sample_key will parse learner.data_keys.
- Type
Optional
- score_func
Function for score evaluation. Necessary if “mode” = “top”.
- Type
Optional[Callable]
- largest
Sorting order for “top” mode
- Type
bool
- dir_path
If defined, then logs will be writed in this directory. Else in lighting_logs.
- Type
Optional[str]
- save_on_disk
If true, then logs will be writed on disk to “dir_path”.
- Type
bool
- _log_on_disk(samples: List, dataloader_idx: int = 0)
Method for logging on disk.
- samples
List of returns from get_log.
- Type
List
- dataloader_idx
Index of dataloader.
- Type
int, default: 0