HyperGAN
Search…
Gradient Penalty
https://arxiv.org/pdf/1704.00028.pdf
lambdarelu(gradients(target,components)2flex)2lambda * relu(||gradients(target, components)||_2 - flex) ^2

examples

1
{
2
"class": "function:hypergan.train_hooks.gradient_penalty_train_hook.GradientPenaltyTra
3
"lambda": 1.00,
4
"flex": 1.0,
5
"components": ["discriminator"],
6
"target": "discriminator"
7
}
Copied!

options

attribute
description
type
target
Used in gradients(target, components)
defaults to discriminator
string (optional)
lambda
Loss multiple
defaults to 1.0
float
components
Used in gradients(target, components)
defaults to all components
array of strings
flex
Can also be a list for separate X/G flex.
example: [0.0, 10.0]
array of float
loss
Side loss is added to: g_loss or d_loss
defaults to g_loss
string
Last modified 1yr ago
Copy link