-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
SRFlow/code/models/modules/SRFlowNet_arch.py
Lines 92 to 97 in 5a007ad
| if add_gt_noise: | |
| # Setup | |
| noiseQuant = opt_get(self.opt, ['network_G', 'flow', 'augmentation', 'noiseQuant'], True) | |
| if noiseQuant: | |
| z = z + ((torch.rand(z.shape, device=z.device) - 0.5) / self.quant) | |
| logdet = logdet + float(-np.log(self.quant) * pixels) |
According to the lines, uniform noise between [-0.5,0.5) is added into the input image, is the operation necessary? And why the logdet should be updated like this? When I read the paper, I noticed the description in the trainning details section as below, but i am not sure whether it's implemented by the mentioned lines or not.
adding slight random noise to the target image helps the training process and leads to better visual results. We therefore add Gaussian noise with a standard deviation of
$\sigma = 4/ \sqrt 3$ to the high-resolution image. In contrast to [21], we do not employ 5-bit quantization.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels