HyperGAN
Search…
HyperGAN
About
Getting started
CLI guide
Configurations
Showcase
AI Explorer for Android
Youtube, Twitter, Discord +
Examples
2D
Text
Classification
Colorizer
Next Frame (video)
Tutorials
Training a GAN
Pygame inference
Creating an image dataset
Searching for hyperparameters
Components
GAN
Generator
Discriminator
Layers
Loss
ALI Loss
F Divergence Loss
Least Squares Loss
Logistic Loss
QP Loss
RAGAN Loss
Realness Loss
Softmax Loss
Standard Loss
Wasserstein Loss
Latent
Trainer
Optimizer
Train Hook
Other GAN implementations
Powered By
GitBook
QP Loss
https://arxiv.org/abs/1811.07296
From
https://arxiv.org/abs/1811.07296
​
Source:
/losses/qp_loss_loss.py
​
1
lam
=
10.0
/
(
reduce
(
lambda
x
,
y
:
x
*
y
,
gan
.
output_shape
()))
2
dist
=
(
gan
.
generator
.
sample
-
self
.
gan
.
inputs
.
sample
).
abs
().
mean
()
3
​
4
dl
=
-
d_real
+
d_fake
5
d_norm
=
10
*
dist
6
d_loss
=
(
dl
+
0.5
*
dl
**
2
/
d_norm
).
mean
()
7
​
8
g_loss
=
d_real
-
d_fake
Copied!
examples
1
{
2
"class"
:
"function:hypergan.losses.qp_loss.QPLoss"
3
}
Copied!
Previous
Logistic Loss
Next
RAGAN Loss
Last modified
1yr ago
Copy link
Contents
examples