forked from mrq/DL-Art-School
Fix discriminator noise floor
This commit is contained in:
parent
c8ab89d243
commit
a946483f1c
|
@ -198,10 +198,10 @@ class SRGANModel(BaseModel):
|
||||||
p.requires_grad = False
|
p.requires_grad = False
|
||||||
|
|
||||||
# Calculate a standard deviation for the gaussian noise to be applied to the discriminator, termed noise-theta.
|
# Calculate a standard deviation for the gaussian noise to be applied to the discriminator, termed noise-theta.
|
||||||
if step >= self.D_noise_final:
|
if self.D_noise_final == 0:
|
||||||
noise_theta = 0
|
noise_theta = 0
|
||||||
else:
|
else:
|
||||||
noise_theta = (self.D_noise_theta - self.D_noise_theta_floor) * (self.D_noise_final - step) / self.D_noise_final + self.D_noise_theta_floor
|
noise_theta = (self.D_noise_theta - self.D_noise_theta_floor) * (self.D_noise_final - min(step, self.D_noise_final)) / self.D_noise_final + self.D_noise_theta_floor
|
||||||
|
|
||||||
self.fake_GenOut = []
|
self.fake_GenOut = []
|
||||||
var_ref_skips = []
|
var_ref_skips = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user