|
| | GAN (Model generator, Model discriminator, InitializationRuleType &initializeRule, Noise &noiseFunction, const size_t noiseDim, const size_t batchSize, const size_t generatorUpdateStep, const size_t preTrainSize, const double multiplier, const double clippingParameter=0.01, const double lambda=10.0) |
| | Constructor for GAN class. More...
|
| |
| | GAN (const GAN &) |
| | Copy constructor. More...
|
| |
| | GAN (GAN &&) |
| | Move constructor. More...
|
| |
| const Model & | Discriminator () const |
| | Return the discriminator of the GAN. More...
|
| |
| Model & | Discriminator () |
| | Modify the discriminator of the GAN. More...
|
| |
| template<typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, StandardGAN >::value||std::is_same
< Policy, DCGAN >::value,
double >::type | Evaluate (const arma::mat ¶meters, const size_t i, const size_t batchSize) |
| | Evaluate function for the Standard GAN and DCGAN. More...
|
| |
| template<typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, WGAN >::value,
double >::type | Evaluate (const arma::mat ¶meters, const size_t i, const size_t batchSize) |
| | Evaluate function for the WGAN. More...
|
| |
| template<typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, WGANGP >::value,
double >::type | Evaluate (const arma::mat ¶meters, const size_t i, const size_t batchSize) |
| | Evaluate function for the WGAN-GP. More...
|
| |
| template<typename GradType , typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, StandardGAN >::value||std::is_same
< Policy, DCGAN >::value,
double >::type | EvaluateWithGradient (const arma::mat ¶meters, const size_t i, GradType &gradient, const size_t batchSize) |
| | EvaluateWithGradient function for the Standard GAN and DCGAN. More...
|
| |
| template<typename GradType , typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, WGAN >::value,
double >::type | EvaluateWithGradient (const arma::mat ¶meters, const size_t i, GradType &gradient, const size_t batchSize) |
| | EvaluateWithGradient function for the WGAN. More...
|
| |
| template<typename GradType , typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, WGANGP >::value,
double >::type | EvaluateWithGradient (const arma::mat ¶meters, const size_t i, GradType &gradient, const size_t batchSize) |
| | EvaluateWithGradient function for the WGAN-GP. More...
|
| |
| void | Forward (const arma::mat &input) |
| | This function does a forward pass through the GAN network. More...
|
| |
| const Model & | Generator () const |
| | Return the generator of the GAN. More...
|
| |
| Model & | Generator () |
| | Modify the generator of the GAN. More...
|
| |
| template<typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, StandardGAN >::value||std::is_same
< Policy, DCGAN >::value, void >
::type | Gradient (const arma::mat ¶meters, const size_t i, arma::mat &gradient, const size_t batchSize) |
| | Gradient function for Standard GAN and DCGAN. More...
|
| |
| template<typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, WGAN >::value, void >
::type | Gradient (const arma::mat ¶meters, const size_t i, arma::mat &gradient, const size_t batchSize) |
| | Gradient function for WGAN. More...
|
| |
| template<typename Policy = PolicyType> |
std::enable_if< std::is_same
< Policy, WGANGP >::value,
void >::type | Gradient (const arma::mat ¶meters, const size_t i, arma::mat &gradient, const size_t batchSize) |
| | Gradient function for WGAN-GP. More...
|
| |
| size_t | NumFunctions () const |
| | Return the number of separable functions (the number of predictor points). More...
|
| |
| const arma::mat & | Parameters () const |
| | Return the parameters of the network. More...
|
| |
| arma::mat & | Parameters () |
| | Modify the parameters of the network. More...
|
| |
| void | Predict (arma::mat input, arma::mat &output) |
| | This function predicts the output of the network on the given input. More...
|
| |
| const arma::mat & | Predictors () const |
| | Get the matrix of data points (predictors). More...
|
| |
| arma::mat & | Predictors () |
| | Modify the matrix of data points (predictors). More...
|
| |
| void | Reset () |
| |
| void | ResetData (arma::mat trainData) |
| | Initialize the generator, discriminator and weights of the model for training. More...
|
| |
| const arma::mat & | Responses () const |
| | Get the matrix of responses to the input data points. More...
|
| |
| arma::mat & | Responses () |
| | Modify the matrix of responses to the input data points. More...
|
| |
| template<typename Archive > |
| void | serialize (Archive &ar, const unsigned int) |
| | Serialize the model. More...
|
| |
| void | Shuffle () |
| | Shuffle the order of function visitation. More...
|
| |
| template<typename OptimizerType , typename... CallbackTypes> |
| double | Train (arma::mat trainData, OptimizerType &Optimizer, CallbackTypes &&...callbacks) |
| | Train function. More...
|
| |
template<typename Model, typename InitializationRuleType, typename Noise, typename PolicyType = StandardGAN>
class mlpack::ann::GAN< Model, InitializationRuleType, Noise, PolicyType >
The implementation of the standard GAN module.
Generative Adversarial Networks (GANs) are a class of artificial intelligence algorithms used in unsupervised machine learning, implemented by a system of two neural networks contesting with each other in a zero-sum game framework. This technique can generate photographs that look at least superficially authentic to human observers, having many realistic characteristics. GANs have been used in Text-to-Image Synthesis, Medical Drug Discovery, High Resolution Imagery Generation, Neural Machine Translation and so on.
For more information, see the following paper:
@article{Goodfellow14,
author = {Ian J. Goodfellow, Jean Pouget-Abadi, Mehdi Mirza, Bing Xu,
David Warde-Farley, Sherjil Ozair, Aaron Courville and
Yoshua Bengio},
title = {Generative Adversarial Nets},
year = {2014},
url = {http:
eprint = {1406.2661},
}
- Template Parameters
-
| Model | The class type of Generator and Discriminator. |
| InitializationRuleType | Type of Initializer. |
| Noise | The noise function to use. |
| PolicyType | The GAN variant to be used (GAN, DCGAN, WGAN or WGANGP). |
Definition at line 63 of file gan.hpp.