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 calculate database queries
B. To sort data into classes
C. To remove all data noise
D. To create new data samples

2 What is a latent vector in a generative model?

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

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

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

4 Why is GAN training described as adversarial?

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

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

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

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

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

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

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

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

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

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 empty and missing samples
B. Only validation and test samples
C. Only incorrectly labeled samples
D. Both real and generated samples

11 What is mode collapse in GAN training?

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

12 Which issue is commonly associated with training GANs?

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

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 is stored in a container
C. A translated sample uses a larger batch size
D. A translated sample can return to its original form

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

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

16 In the FGSM expression , what does control?

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

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

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

18 What is the purpose of a Dockerfile?

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

19 What is Streamlit commonly used for in model deployment?

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

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. Unlimited file storage
C. Automatic data labeling
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 regression model that estimates product prices
B. A discriminative model that predicts product categories
C. A generative model that learns the data distribution
D. A clustering model that assigns product groups

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 generates a new example similar to the training data
C. It removes all noise from 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. Real data discriminator generator
B. Real data generator discriminator
C. Noise generator discriminator
D. Noise 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. Decrease and increase
C. Increase both and
D. Increase and decrease

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 real
B. The discriminator strongly considers the generated image fake
C. The image contains approximately noise
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. Both networks' parameters
B. Only the discriminator parameters
C. Only the generator parameters
D. Neither network's parameters

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

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

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

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

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

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

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 let each network adapt to the other network's behavior
C. To remove the need for gradient backpropagation
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. Gradient clipping
B. Data augmentation
C. Mode collapse
D. Latent interpolation

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. Increase the discriminator's learning rate and capacity
C. Remove random noise from the generator input
D. Train the discriminator without generated samples

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 requires each horse image to match a zebra image
B. It can learn translation using unpaired domain datasets
C. It performs translation using class labels alone
D. It trains only one generator without a discriminator

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. Attack success and perturbation visibility may both increase
B. The model parameters are automatically retrained
C. Attack success decreases while visibility remains unchanged
D. The perturbation becomes smaller but more effective

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 new container network
B. A different container hostname
C. A Docker volume or bind mount
D. A larger image layer

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. Expose the Streamlit port through a Docker network
B. Install NVIDIA Container Toolkit and enable GPU access
C. Increase the container's shared memory without GPU flags
D. Mount the model directory as a read-only volume

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 server address to 0.0.0.0
B. Set the browser address to 127.0.0.1
C. Set the model device to cpu
D. Set the CUDA index to -1

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. Convert each generated image to plain text
B. Load the model with st.cache_resource
C. Disable CUDA before running model inference
D. Reload the model inside every widget callback

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. Reverse KL integrates only over , so it assigns infinite cost to generated samples outside the data support.
C. Reverse KL and maximum likelihood minimize identical objectives whenever both distributions are represented by neural networks with the same parameter count.
D. Maximum likelihood minimizes , which becomes infinite when where .

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 latent prior cannot be sampled unless the generator is invertible.
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 generated distribution may lie on a lower-dimensional manifold without a regular density in observation space.

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. for every generator and .
B. and .
C. and .
D. and equals the Wasserstein distance between the two distributions.

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 provides a stronger generator gradient when the discriminator confidently rejects generated samples.
B. It changes the equilibrium so that the discriminator predicts one for both real and generated data.
C. It exactly minimizes the Wasserstein distance without requiring a Lipschitz-constrained discriminator.
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 forces the critic to be exactly linear over the entire observation space.
B. It converts the critic output into a calibrated binary probability.
C. It approximately enforces the critic's Lipschitz behavior in regions connecting the two sampled distributions.
D. It guarantees global -Lipschitz continuity for every possible input without imposing any constraint on the generator.

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

Generator Hard
A. Increase the discriminator depth while leaving the generator unchanged.
B. Use deterministic resize upsampling followed by an ordinary convolution.
C. 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.
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. Switch the discriminator to evaluation mode while leaving the deployed generator in training mode.
B. Disable latent sampling and pass an all-zero latent vector for every request.
C. Keep the generator in training mode so each sample defines new normalization statistics.
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. Disable differentiation through the discriminator's input during the generator update while updating only its frozen weights.
B. Detach generated samples during the discriminator update; during the generator update, preserve gradients through the discriminator to the generator.
C. Detach generated samples during both updates so the generator is isolated from discriminator gradients.
D. Preserve generator gradients during the discriminator update and reuse those stale gradients during the generator update.

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

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

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. High precision and low recall
B. Low precision and low recall
C. High precision and high recall
D. Low 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 forward KL divergence becomes exactly zero, so the generator has no objective to optimize.
B. The discriminator output must remain on both manifolds, causing random gradients.
C. The Jensen–Shannon divergence becomes locally constant, allowing the discriminator to saturate and provide weak 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. The generators can learn an invertible but semantically arbitrary mapping, potentially hiding reconstruction information in imperceptible signals.
B. Cycle consistency requires paired examples and therefore cannot be computed from unpaired datasets.
C. The discriminators explicitly maximize pixelwise distance between an input and its translated output.
D. Cycle consistency mathematically forces both generators to implement identity mappings whenever the two domains have equal sample counts.

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 complete copy of the same CUDA toolkit installed on both the host and every mounted volume.
C. A CPU-only NVIDIA driver combined with privileged mode so Docker can emulate CUDA instructions.
D. Only a Dockerfile instruction that sets CUDA_VISIBLE_DEVICES=0, regardless of host hardware.

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

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. Cache each generated tensor as ordinary data and reload the model for every session.
C. 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.
D. Declare the model inside the button callback and call training mode before each inference.

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 -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 --gpus all -p 8501:8501 app streamlit run app.py --server.address=127.0.0.1 --server.port=8501