Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] Add an example configurable configuration
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
{ | ||
"description": "An example configurable configuration. - 128x128 only", | ||
"discriminator": | ||
{ | ||
"class": "class:hypergan.discriminators.configurable_discriminator.ConfigurableDiscriminator", | ||
"layers":[ | ||
"conv 64 stride=2", "relu", | ||
"conv 128 stride=2", "relu", | ||
"conv 256 stride=2", "relu", | ||
"conv 512 stride=2", "relu", | ||
"linear 1000", "relu", | ||
"multi_head_attention 512", "relu", | ||
"multi_head_attention 1" | ||
] | ||
}, | ||
"latent": | ||
{ | ||
"class": "function:hypergan.distributions.uniform_distribution.UniformDistribution", | ||
"min": -1, | ||
"max": 1, | ||
"z": 256 | ||
}, | ||
"generator": { | ||
"class": "class:hypergan.discriminators.configurable_discriminator.ConfigurableDiscriminator", | ||
"layers":[ | ||
"identity name=z", | ||
"latent", | ||
"split 128 0", | ||
"multi_head_attention 256 initializer=(xavier_normal)","relu", | ||
"identity name=w", | ||
"layer z", | ||
"latent", | ||
"split 128 1", | ||
"multi_head_attention 512 initializer=(xavier_normal)","relu", | ||
"multi_head_attention 4096 initializer=(xavier_normal)","relu", | ||
"reshape 4*4*256","relu", | ||
"deconv 512 stride=2", "add self (ez_norm initializer=(xavier_normal))", "relu", | ||
"deconv 256 stride=2", "add self (ez_norm initializer=(xavier_normal))", "relu", | ||
"deconv 128 stride=2", "add self (ez_norm initializer=(xavier_normal))", "relu", | ||
"deconv 64 stride=2", "add self (ez_norm initializer=(xavier_normal))", "relu", | ||
"deconv 3 stride=2", "add self (ez_norm initializer=(xavier_normal))", "hardtanh" | ||
] | ||
}, | ||
"loss": | ||
{ | ||
"class": "function:hypergan.losses.standard_loss.StandardLoss", | ||
"reduce": "reduce_mean" | ||
}, | ||
"trainer": { | ||
"class": "function:hypergan.trainers.simultaneous_trainer.SimultaneousTrainer", | ||
|
||
"hooks": [ | ||
{ | ||
"class": "function:hypergan.train_hooks.adversarial_norm_train_hook.AdversarialNormTrainHook", | ||
"gammas": [-1e12, 1e12], | ||
"offset": 1.0, | ||
"loss": [ | ||
"dg" | ||
], | ||
"mode": "fake" | ||
}, | ||
{ | ||
"class": "function:hypergan.train_hooks.adversarial_norm_train_hook.AdversarialNormTrainHook", | ||
"gamma": -1e12, | ||
"offset": 1.0, | ||
"loss": [ | ||
"d" | ||
], | ||
"mode": "real" | ||
} | ||
], | ||
"optimizer": { | ||
"amsgrad": true, | ||
"betas": [ | ||
0.1, | ||
0.997 | ||
], | ||
"class": "class:torch.optim.Adam", | ||
"eps": 1e-08, | ||
"lr": 0.0001, | ||
"weight_decay": 0 | ||
} | ||
}, | ||
"runtime": { | ||
"anysize": true, | ||
"train": "hypergan train [dataset] --sampler static_batch -b 8 --size 64x64x3" | ||
}, | ||
"hypergan_version": "~1", | ||
"class": "class:hypergan.gans.standard_gan.StandardGAN" | ||
} |