HyperGAN
Search…
RAGAN Loss
1
# wasserstein type
2
cr = torch.mean(d_real,0)
3
cf = torch.mean(d_fake,0)
4
d_loss = -(d_real-cf) + (d_fake-cr)
5
g_loss = -(d_fake-cr)
Copied!

examples

1
{
2
"class": "function:hypergan.losses.ragan_loss.RaganLoss",
3
"type": "hinge"
4
}
Copied!

options

attribute
description
type
type
least_squares,hinge,wasserstein or standard. Defaults to standard
string (optional)
rgan
rgan does not average over batch. Defaults to false
boolean (optional)
labels
[a,b,c]. Defaults to [-1,1,1]. Only used in least_squares type
array of floats (optional)
Last modified 1yr ago
Copy link