GAN_MNIST_tf module

GAN_MNIST_tf.Discriminator_MNIST_cond()[source]

Conditional Discriminator model for MNIST dataset.

Returns:

A Keras model that takes as input an image and a one-hot encoded label and outputs a scalar value indicating real or fake.

Return type:

Model

Input:

x_input (Tensor): Input MNIST image of shape (batch_size, 28, 28). z_input (Tensor): One-hot encoded label of shape (batch_size, 10).

Output:

Tensor: Discriminator output scalar for each image in the batch.

GAN_MNIST_tf.Generator_MNIST_cond(latent_dim=118)[source]

Conditional Generator model for MNIST dataset.

Parameters:

latent_dim (int) – Dimension of the latent input vector. Default is 118.

Returns:

A Keras model that takes as input a latent vector and a one-hot encoded label and outputs a generated image.

Return type:

Model

Input:

label (Tensor): One-hot encoded label of shape (batch_size, 10). z (Tensor): Latent input vector of shape (batch_size, latent_dim).

Output:

Tensor: Generated image of shape (batch_size, 24, 24, 1).