VanillaGanModel: Vanilla GAN model

VanillaGanModelR Documentation

Vanilla GAN model

Description

Original generative adverserial network from the paper:

Details

https://arxiv.org/abs/1406.2661

and ported from the Keras (python) implementation:

https://github.com/eriklindernoren/Keras-GAN/blob/master/gan/gan.py

Arguments

inputImageSize
latentDimension

Details

$initialize instantiates a new class and builds the generator and discriminator. $buildGeneratorbuild generator. $buildGeneratorbuild discriminator.

Author(s)

Tustison NJ

Examples

## Not run: 

library( keras )
library( ANTsRNet )

keras::backend()$clear_session()

# Let's use the mnist data set.

mnist <- dataset_mnist()

numberOfTrainingData <- length( mnist$train$y )

inputImageSize <- c( dim( mnist$train$x[1,,] ), 1 )

x <- array( data = mnist$train$x / 255, dim = c( numberOfTrainingData, inputImageSize ) )
y <- mnist$train$y

numberOfClusters <- length( unique( mnist$train$y ) )

# Instantiate the DCEC model

ganModel <- VanillaGanModel$new(
   inputImageSize = inputImageSize,
   latentDimension = 100 )

ganModel$train( x, numberOfEpochs = 100 )

## End(Not run)


ANTsX/ANTsRNet documentation built on April 23, 2024, 1:24 p.m.