Simple Inverse Mapping
A simple inverse mapping module which expects a trained GAN module as function \(G: A \rightarrow B\).
- class ecgan.modules.inverse_mapping.vanilla_inverse_mapping.SimpleGANInverseMapping(inv_cfg, module_cfg, run_path, seq_len, num_channels, tracker)[source]
Bases:
ecgan.modules.inverse_mapping.inverse_mapping.InvertibleBaseModule
Implementation of a simple inverse mapping module.
The module expects a pre-trained generator model and trains a downsampling CNN based on the generator model.
- property watch_list: List
Return torch nn.Modules that should be watched during training.
- Return type
List
- on_epoch_end(epoch, sample_interval, batch_size)[source]
Perform artifact and metric logging in a sample interval.
The function creates two types of sample images:
Apply the generator module on some fixed noise and some randomly sampled noise.
Apply the inverse mapping on the output of the generator and then re-apply the generator on the output of the downsampling.
- Return type
List
[Artifact
]