Corrected value for adversarial loss. Don't refactor math the day after stopping coffee.
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
|
||||
|
||||
# Train the model using an adversarial setup based on [4] below.
|
||||
python3.4 enhance.py --train "data/*.jpg" --model custom --scales=2 --epochs=250 \
|
||||
--perceptual-layer=conv5_2 --smoothness-weight=2e4 --adversary-weight=2e5 \
|
||||
--perceptual-layer=conv5_2 --smoothness-weight=2e4 --adversary-weight=1e3 \
|
||||
--generator-start=5 --discriminator-start=0 --adversarial-start=5 \
|
||||
--discriminator-size=64
|
||||
|
||||
|
||||
+1
-1
@@ -374,7 +374,7 @@ class Model(object):
|
||||
return T.mean(((x[:,:,:-1,:-1] - x[:,:,1:,:-1])**2 + (x[:,:,:-1,:-1] - x[:,:,:-1,1:])**2)**1.25)
|
||||
|
||||
def loss_adversarial(self, d):
|
||||
return T.mean(1.0 - T.nnet.softplus(d[args.batch_size:]))
|
||||
return T.mean(1.0 - T.nnet.softminus(d[args.batch_size:]))
|
||||
|
||||
def loss_discriminator(self, d):
|
||||
return T.mean(T.nnet.softminus(d[args.batch_size:]) - T.nnet.softplus(d[:args.batch_size]))
|
||||
|
||||
Reference in New Issue
Block a user