diff --git a/README.rst b/README.rst index ffa3331..a4948f8 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/enhance.py b/enhance.py index cb67e17..c4fd9fb 100755 --- a/enhance.py +++ b/enhance.py @@ -374,7 +374,7 @@ def loss_total_variation(self, x): 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]))