Unit 6: Generative Adversarial Networks - Practice Quiz

INT422 — Deep Learning 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main purpose of a generative model?

Introduction to generative models Easy
A. To sort data into classes
B. To create new data samples
C. To calculate database queries
D. To remove all data noise

2 What is a latent vector in a generative model?

Introduction to generative models Easy
A. A compressed input representation
B. A collection of output files
C. A list of class labels
D. A model evaluation score

3 Which two neural networks form the basic structure of a GAN?

Overview of GAN structure Easy
A. Generator and discriminator
B. Encoder and classifier
C. Regressor and optimizer
D. Tokenizer and decoder

4 Why is GAN training described as adversarial?

Overview of GAN structure Easy
A. Two optimizers share identical weights
B. Two servers exchange model files
C. Two datasets are merged during training
D. Two networks compete during training

5 What is the primary role of the discriminator in a GAN?

Discriminator Easy
A. Distinguish real samples from generated samples
B. Display predictions through a web interface
C. Generate samples from random input values
D. Store images inside a Docker container

6 The discriminator in a basic GAN is commonly treated as which type of model?

Discriminator Easy
A. Clustering model
B. Database indexer
C. Binary classifier
D. Sequence generator

7 What does the generator produce in an image-based GAN?

Generator Easy
A. Class probabilities
B. Database tables
C. Synthetic images
D. Container logs

8 What is commonly provided as input to a GAN generator?

Generator Easy
A. A confusion matrix
B. A class accuracy value
C. A random noise vector
D. A Docker image

9 How are the generator and discriminator commonly trained in a basic GAN?

Building GAN Easy
A. They use no loss functions
B. They are updated only once
C. They are updated alternately
D. They keep fixed random weights

10 When training the discriminator, which samples are commonly used?

Building GAN Easy
A. Only incorrectly labeled samples
B. Both real and generated samples
C. Only empty and missing samples
D. Only validation and test samples

11 What is mode collapse in GAN training?

Problems with GANs Easy
A. The server disables its GPU device
B. The generator produces limited varieties
C. The discriminator stores too many labels
D. The dataset loses its file names

12 Which issue is commonly associated with training GANs?

Problems with GANs Easy
A. Automatic labeling
B. Perfect generalization
C. Unstable training
D. Guaranteed convergence

13 What type of training data is CycleGAN designed to work with?

CycleGAN Easy
A. Tabular data from one database
B. Labeled text from one language
C. Unpaired images from two domains
D. Paired images from one domain

14 What does cycle consistency encourage in CycleGAN?

CycleGAN Easy
A. A translated sample receives a new class label
B. A translated sample uses a larger batch size
C. A translated sample can return to its original form
D. A translated sample is stored in a container

15 What is the main purpose of the Fast Gradient Sign Method (FGSM)?

Adversarial FGSM Easy
A. Display models in a web browser
B. Translate images between domains
C. Generate Docker configuration files
D. Create adversarial input examples

16 In the FGSM expression , what does control?

Adversarial FGSM Easy
A. The number of classes
B. The perturbation size
C. The network depth
D. The dataset size

17 What is a main benefit of using Docker for a deep learning application?

Use of Docker Easy
A. It replaces the need for model testing
B. It packages code and dependencies consistently
C. It automatically creates training labels
D. It guarantees perfect model accuracy

18 What is the purpose of a Dockerfile?

Use of Docker Easy
A. Measure the accuracy of a model
B. Define instructions for building an image
C. Store labels for a dataset
D. Generate adversarial image examples

19 What is Streamlit commonly used for in model deployment?

Model deployment on NVIDIA Server using Streamlit framework Easy
A. Designing graphics processing hardware
B. Compressing datasets into archives
C. Building interactive web applications
D. Creating adversarial training samples

20 What is a key advantage of deploying a deep learning model on an NVIDIA GPU server?

Model deployment on NVIDIA Server using Streamlit framework Easy
A. Guaranteed model fairness
B. Automatic data labeling
C. Unlimited file storage
D. Faster parallel computation

21 A company wants a model that can create new product images resembling its training catalog. Which type of model is most appropriate?

Introduction to generative models Medium
A. A discriminative model that predicts product categories
B. A clustering model that assigns product groups
C. A generative model that learns the data distribution
D. A regression model that estimates product prices

22 A generative model learns an approximation of a dataset's distribution. What does sampling accomplish?

Introduction to generative models Medium
A. It assigns a fixed class label to every input
B. It removes all noise from the training data
C. It generates a new example similar to the training data
D. It calculates the accuracy of a classifier

23 During GAN training, which data flow correctly describes the generation and evaluation of a fake sample?

Overview of GAN structure Medium
A. Noise generator discriminator
B. Real data generator discriminator
C. Noise discriminator generator
D. Real data discriminator generator

24 In the minimax GAN objective what is the discriminator attempting to do?

Overview of GAN structure Medium
A. Decrease both and
B. Increase and decrease
C. Decrease and increase
D. Increase both and

25 A discriminator outputs for a generated image. Assuming the output represents the probability that the image is real, how should this result be interpreted?

Discriminator Medium
A. The discriminator strongly considers the generated image fake
B. The image contains approximately noise
C. The discriminator strongly considers the generated image real
D. The generator assigns the image to class

26 When updating only the discriminator in a GAN training iteration, which parameters should receive gradient-based updates?

Discriminator Medium
A. Only the discriminator parameters
B. Both networks' parameters
C. Neither network's parameters
D. Only the generator parameters

27 Why is a non-saturating generator loss such as commonly used instead of minimizing ?

Generator Medium
A. It provides stronger gradients when generated samples are poor
B. It directly computes the likelihood of real data
C. It eliminates the need to train the discriminator
D. It guarantees that mode collapse cannot occur

28 A generator maps a -dimensional latent vector to a image. What is the generator learning?

Generator Medium
A. A mapping from labels to discriminator scores
B. A mapping from latent space to image space
C. A mapping from image space to class labels
D. A mapping from images to latent probabilities

29 During a generator update, why is the discriminator commonly frozen while the generated samples are passed through it?

Building GAN Medium
A. To update both networks using the same gradients
B. To update the generator using discriminator feedback only
C. To replace adversarial loss with reconstruction loss
D. To prevent generated samples from reaching the discriminator

30 A GAN training loop first trains the discriminator on real and fake batches and then trains the generator. What is the main purpose of this alternating procedure?

Building GAN Medium
A. To ensure the latent vectors equal the real samples
B. To remove the need for gradient backpropagation
C. To let each network adapt to the other network's behavior
D. To make both networks minimize an identical classification loss

31 A trained GAN generates sharp images, but nearly all outputs show the same type of face despite a diverse training set. Which problem is most likely occurring?

Problems with GANs Medium
A. Data augmentation
B. Gradient clipping
C. Latent interpolation
D. Mode collapse

32 The discriminator quickly reaches near-perfect accuracy, after which the generator learns very slowly. Which intervention is most directly intended to restore a useful training balance?

Problems with GANs Medium
A. Reduce the discriminator's learning rate or update frequency
B. Train the discriminator without generated samples
C. Increase the discriminator's learning rate and capacity
D. Remove random noise from the generator input

33 A CycleGAN learns mappings and . Which expression represents cycle consistency for a sample ?

CycleGAN Medium
A.
B.
C.
D.

34 A researcher has separate collections of horse images and zebra images, but no paired image shows the same scene in both styles. Why is CycleGAN suitable for this task?

CycleGAN Medium
A. It can learn translation using unpaired domain datasets
B. It requires each horse image to match a zebra image
C. It trains only one generator without a discriminator
D. It performs translation using class labels alone

35 Which formula correctly defines an FGSM adversarial example for input , label , model parameters , and perturbation size ?

Adversarial FGSM Medium
A.
B.
C.
D.

36 An FGSM attack increases from to while keeping the model and inputs unchanged. What is the most likely effect?

Adversarial FGSM Medium
A. The perturbation becomes smaller but more effective
B. Attack success decreases while visibility remains unchanged
C. The model parameters are automatically retrained
D. Attack success and perturbation visibility may both increase

37 A GAN application runs correctly inside a Docker container, but generated images disappear when the container is removed. What should be used to preserve the images on the host?

Use of Docker Medium
A. A Docker volume or bind mount
B. A larger image layer
C. A new container network
D. A different container hostname

38 A containerized deep learning application cannot access the NVIDIA GPU even though CUDA-compatible drivers are installed on the host. Which action is most relevant?

Use of Docker Medium
A. Mount the model directory as a read-only volume
B. Expose the Streamlit port through a Docker network
C. Increase the container's shared memory without GPU flags
D. Install NVIDIA Container Toolkit and enable GPU access

39 A Streamlit app runs on an NVIDIA server but is inaccessible from other machines because it listens only on localhost. Which configuration should be changed?

Model deployment on NVIDIA Server using Streamlit framework Medium
A. Set the CUDA index to -1
B. Set the model device to cpu
C. Set the browser address to 127.0.0.1
D. Set the server address to 0.0.0.0

40 A Streamlit GAN application reloads a large model onto the NVIDIA GPU after every user interaction. Which approach best reduces this repeated loading overhead?

Model deployment on NVIDIA Server using Streamlit framework Medium
A. Disable CUDA before running model inference
B. Reload the model inside every widget callback
C. Load the model with st.cache_resource
D. Convert each generated image to plain text

41 Suppose contains a low-probability mode on which . Which statement best explains why maximum-likelihood training usually penalizes this omission more strongly than minimizing reverse KL divergence?

Introduction to generative models Hard
A. Maximum likelihood minimizes , which assigns equal cost to every omitted data mode.
B. Maximum likelihood minimizes , which becomes infinite when where .
C. Reverse KL integrates only over , so it assigns infinite cost to generated samples outside the data support.
D. Reverse KL and maximum likelihood minimize identical objectives whenever both distributions are represented by neural networks with the same parameter count.

42 A generator transforms into , where and no observation noise is added. Why is exact likelihood evaluation generally unavailable?

Introduction to generative models Hard
A. The generated distribution is uniform over the entire observation space.
B. The generated distribution may lie on a lower-dimensional manifold without a regular density in observation space.
C. The generator necessarily defines a Gaussian density whose covariance is singular, but its exact likelihood can always be recovered by applying the standard change-of-variables determinant.
D. The latent prior cannot be sampled unless the generator is invertible.

43 For the original GAN value function assume the discriminator has unlimited capacity and is optimized exactly. Which result follows?

Overview of GAN structure Hard
A. and equals the Wasserstein distance between the two distributions.
B. and .
C. for every generator and .
D. and .

44 Early in training, suppose . Why is the non-saturating generator loss commonly preferred to the minimax loss ?

Overview of GAN structure Hard
A. It exactly minimizes the Wasserstein distance without requiring a Lipschitz-constrained discriminator.
B. It changes the equilibrium so that the discriminator predicts one for both real and generated data.
C. It provides a stronger generator gradient when the discriminator confidently rejects generated samples.
D. It removes the discriminator from the generator's computational graph during backpropagation.

45 A discriminator uses binary cross-entropy with one-sided label smoothing: real examples receive target , while fake examples receive target . If and real and fake examples are weighted equally, what is the pointwise optimal discriminator output?

Discriminator Hard
A.
B.
C.
D.

46 In WGAN-GP, why is the penalty evaluated on interpolations between real and generated samples?

Discriminator Hard
A. It converts the critic output into a calibrated binary probability.
B. It guarantees global -Lipschitz continuity for every possible input without imposing any constraint on the generator.
C. It approximately enforces the critic's Lipschitz behavior in regions connecting the two sampled distributions.
D. It forces the critic to be exactly linear over the entire observation space.

47 A transposed-convolution generator exhibits periodic checkerboard artifacts. Which architectural change most directly addresses the usual cause?

Generator Hard
A. Use larger transposed-convolution kernels at every layer, add several nonlinearities after each kernel, and reduce the latent dimension until adjacent output pixels become statistically independent.
B. Use deterministic resize upsampling followed by an ordinary convolution.
C. Increase the discriminator depth while leaving the generator unchanged.
D. Replace upsampling layers with max pooling followed by a fully connected layer.

48 A generator containing batch-normalization layers produces stable images during training but inconsistent images when deployed for single-sample inference. What is the most likely correction?

Generator Hard
A. Keep the generator in training mode so each sample defines new normalization statistics.
B. Disable latent sampling and pass an all-zero latent vector for every request.
C. Switch the discriminator to evaluation mode while leaving the deployed generator in training mode.
D. Call the generator's evaluation mode so stored running statistics are used.

49 Which gradient-handling procedure is correct for a standard alternating GAN training iteration?

Building GAN Hard
A. Detach generated samples during both updates so the generator is isolated from discriminator gradients.
B. Preserve generator gradients during the discriminator update and reuse those stale gradients during the generator update.
C. Detach generated samples during the discriminator update; during the generator update, preserve gradients through the discriminator to the generator.
D. Disable differentiation through the discriminator's input during the generator update while updating only its frozen weights.

50 A discriminator ends with a linear logit . Which implementation is the most numerically stable for binary adversarial training?

Building GAN Hard
A. Apply a sigmoid and then pass the probability to a logits-based binary cross-entropy loss.
B. Normalize all logits across the batch with softmax and use categorical cross-entropy.
C. Pass the raw logit directly to a loss that combines sigmoid and binary cross-entropy.
D. Threshold the logit at zero before computing ordinary binary cross-entropy.

51 A generator produces sharp, realistic images, but nearly all samples belong to only two of ten equally common classes. How should this behavior typically appear in a precision-recall analysis for generative models?

Problems with GANs Hard
A. Low precision and high recall
B. High precision and low recall
C. Low precision and low recall
D. High precision and high recall

52 If and lie on disjoint low-dimensional manifolds and the original discriminator is optimized nearly perfectly, which phenomenon can obstruct generator learning?

Problems with GANs Hard
A. The Jensen–Shannon divergence becomes locally constant, allowing the discriminator to saturate and provide weak gradients.
B. The forward KL divergence becomes exactly zero, so the generator has no objective to optimize.
C. The discriminator output must remain on both manifolds, causing random gradients.
D. The Wasserstein distance becomes constant whenever two probability distributions have disjoint supports.

53 Why do adversarial losses plus cycle consistency fail to guarantee that a learned CycleGAN mapping is semantically correct?

CycleGAN Hard
A. Cycle consistency requires paired examples and therefore cannot be computed from unpaired datasets.
B. Cycle consistency mathematically forces both generators to implement identity mappings whenever the two domains have equal sample counts.
C. The discriminators explicitly maximize pixelwise distance between an input and its translated output.
D. The generators can learn an invertible but semantically arbitrary mapping, potentially hiding reconstruction information in imperceptible signals.

54 Let and . Which identity-loss formulation is used to discourage unnecessary changes to samples already belonging to the destination domain?

CycleGAN Hard
A.
B.
C.
D.

55 Under a first-order approximation of loss , which perturbation maximizes the loss subject to ?

Adversarial FGSM Hard
A.
B.
C.
D.

56 To construct a targeted FGSM example classified as target class , which update is appropriate before clipping to the valid input range?

Adversarial FGSM Hard
A.
B.
C.
D.

57 A CUDA-enabled container reports that no GPU is available, although the image contains CUDA libraries. Which host-side configuration is fundamentally required?

Use of Docker Hard
A. A compatible NVIDIA driver plus NVIDIA Container Toolkit, with the container launched using GPU access.
B. A CPU-only NVIDIA driver combined with privileged mode so Docker can emulate CUDA instructions.
C. Only a Dockerfile instruction that sets CUDA_VISIBLE_DEVICES=0, regardless of host hardware.
D. A complete copy of the same CUDA toolkit installed on both the host and every mounted volume.

58 A deployment image contains a stable application environment, but multi-gigabyte model weights change frequently. Which packaging strategy best avoids rebuilding the entire image for every model update while retaining reproducibility?

Use of Docker Hard
A. Download an unversioned model from the internet during every prediction request.
B. Bake every new weight file into the application image and tag all builds as latest.
C. Store the model only in the container's writable layer and recover it after each container replacement.
D. Mount versioned model weights read-only at runtime while pinning the image and dependency versions.

59 A Streamlit application reloads a large PyTorch GAN onto the GPU on every widget interaction because Streamlit reruns the script. Which deployment pattern is most appropriate?

Model deployment on NVIDIA Server using Streamlit framework Hard
A. Cache the model as a resource, set evaluation mode, and run requests without gradient tracking.
B. Store the GPU model in Streamlit session state separately for every browser connection, duplicate all CUDA tensors per user, and retain computation graphs between reruns.
C. Declare the model inside the button callback and call training mode before each inference.
D. Cache each generated tensor as ordinary data and reload the model for every session.

60 Which command pattern correctly exposes a GPU-backed Streamlit application from a Docker container on server port 8501?

Model deployment on NVIDIA Server using Streamlit framework Hard
A. docker run --gpus all app streamlit run app.py --server.address=0.0.0.0 --server.port=8501
B. docker run --gpus all -p 8501:8501 app streamlit run app.py --server.address=127.0.0.1 --server.port=8501
C. docker run --gpus all -p 8501:8501 app streamlit run app.py --server.address=0.0.0.0 --server.port=8501
D. docker run -p 8501:8501 app streamlit run app.py --server.address=127.0.0.1 --server.port=8501