Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Question 1 of 60 · Introduction to generative models · Easy
What is the main purpose of a generative model?
Not quite. Try another option.
Answer: To create new data samples
A generative model learns the distribution of training data and creates new samples with similar characteristics.
Question 2 of 60 · Introduction to generative models · Easy
What is a latent vector in a generative model?
Not quite. Try another option.
Answer: A compressed input representation
A latent vector is a compact representation, often sampled from a random distribution, that is used to generate data.
Question 3 of 60 · Overview of GAN structure · Easy
Which two neural networks form the basic structure of a GAN?
Not quite. Try another option.
Answer: Generator and discriminator
A GAN consists of a generator that creates samples and a discriminator that evaluates them.
Question 4 of 60 · Overview of GAN structure · Easy
Why is GAN training described as adversarial?
Not quite. Try another option.
Answer: Two networks compete during training
The generator tries to fool the discriminator, while the discriminator tries to identify generated samples.
Question 5 of 60 · Discriminator · Easy
What is the primary role of the discriminator in a GAN?
Not quite. Try another option.
Answer: Distinguish real samples from generated samples
The discriminator estimates whether an input sample is real or produced by the generator.
Question 6 of 60 · Discriminator · Easy
The discriminator in a basic GAN is commonly treated as which type of model?
Not quite. Try another option.
Answer: Binary classifier
The discriminator commonly performs binary classification by predicting whether a sample is real or fake.
Question 7 of 60 · Generator · Easy
What does the generator produce in an image-based GAN?
Not quite. Try another option.
Answer: Synthetic images
The generator transforms its input into synthetic images intended to resemble real training images.
Question 8 of 60 · Generator · Easy
What is commonly provided as input to a GAN generator?
Not quite. Try another option.
Answer: A random noise vector
The generator commonly maps a random noise vector from the latent space to a generated sample.
Question 9 of 60 · Building GAN · Easy
How are the generator and discriminator commonly trained in a basic GAN?
Not quite. Try another option.
Answer: They are updated alternately
GAN training usually alternates between updating the discriminator and updating the generator.
Question 10 of 60 · Building GAN · Easy
When training the discriminator, which samples are commonly used?
Not quite. Try another option.
Answer: Both real and generated samples
The discriminator learns by comparing real training samples with fake samples produced by the generator.
Question 11 of 60 · Problems with GANs · Easy
What is mode collapse in GAN training?
Not quite. Try another option.
Answer: The generator produces limited varieties
Mode collapse occurs when the generator repeatedly creates similar outputs instead of representing the full data distribution.
Question 12 of 60 · Problems with GANs · Easy
Which issue is commonly associated with training GANs?
Not quite. Try another option.
Answer: Unstable training
GAN training can be unstable because the generator and discriminator must improve together while competing.
Question 13 of 60 · CycleGAN · Easy
What type of training data is CycleGAN designed to work with?
Not quite. Try another option.
Answer: Unpaired images from two domains
CycleGAN learns mappings between two image domains without requiring matching image pairs.
Question 14 of 60 · CycleGAN · Easy
What does cycle consistency encourage in CycleGAN?
Not quite. Try another option.
Answer: A translated sample can return to its original form
Cycle consistency encourages translating from one domain to another and back while preserving the original content.
Question 15 of 60 · Adversarial FGSM · Easy
What is the main purpose of the Fast Gradient Sign Method (FGSM)?
Not quite. Try another option.
Answer: Create adversarial input examples
FGSM adds a small, gradient-based perturbation to an input to make a model more likely to predict incorrectly.
Question 16 of 60 · Adversarial FGSM · Easy
In the FGSM expression , what does control?
Not quite. Try another option.
Answer: The perturbation size
The value controls the strength of the adversarial perturbation added to the original input.
Question 17 of 60 · Use of Docker · Easy
What is a main benefit of using Docker for a deep learning application?
Not quite. Try another option.
Answer: It packages code and dependencies consistently
Docker packages an application with its dependencies so that it can run consistently across different environments.
Question 18 of 60 · Use of Docker · Easy
What is the purpose of a Dockerfile?
Not quite. Try another option.
Answer: Define instructions for building an image
A Dockerfile contains the commands and configuration needed to build a Docker image.
Question 19 of 60 · Model deployment on NVIDIA Server using Streamlit framework · Easy
What is Streamlit commonly used for in model deployment?
Not quite. Try another option.
Answer: Building interactive web applications
Streamlit makes it easy to build web interfaces that accept input and display model predictions.
Question 20 of 60 · Model deployment on NVIDIA Server using Streamlit framework · Easy
What is a key advantage of deploying a deep learning model on an NVIDIA GPU server?
Not quite. Try another option.
Answer: Faster parallel computation
NVIDIA GPUs can accelerate the parallel computations used during deep learning inference and training.
Question 21 of 60 · Introduction to generative models · Medium
A company wants a model that can create new product images resembling its training catalog. Which type of model is most appropriate?
Not quite. Try another option.
Answer: A generative model that learns the data distribution
A generative model learns the underlying data distribution and can sample from it to create new examples resembling the training data.
Question 22 of 60 · Introduction to generative models · Medium
A generative model learns an approximation of a dataset's distribution. What does sampling accomplish?
Not quite. Try another option.
Answer: It generates a new example similar to the training data
Sampling from the learned distribution produces a new data instance with statistical characteristics similar to those of the training set.
Question 23 of 60 · Overview of GAN structure · Medium
During GAN training, which data flow correctly describes the generation and evaluation of a fake sample?
Not quite. Try another option.
Answer: Noise generator discriminator
The generator transforms a latent noise vector into a synthetic sample, which the discriminator then evaluates as real or fake.
Question 24 of 60 · Overview of GAN structure · Medium
In the minimax GAN objective what is the discriminator attempting to do?
Not quite. Try another option.
Answer: Increase and decrease
The discriminator aims to assign high probabilities to real samples and low probabilities to samples produced by the generator.
Question 25 of 60 · Discriminator · Medium
A discriminator outputs for a generated image. Assuming the output represents the probability that the image is real, how should this result be interpreted?
Not quite. Try another option.
Answer: The discriminator strongly considers the generated image real
An output near means the discriminator believes the input is real, so the generated image has successfully fooled it.
Question 26 of 60 · Discriminator · Medium
When updating only the discriminator in a GAN training iteration, which parameters should receive gradient-based updates?
Not quite. Try another option.
Answer: Only the discriminator parameters
During the discriminator step, generated samples may be used as inputs, but generator outputs are detached so only discriminator parameters are updated.
Question 27 of 60 · Generator · Medium
Why is a non-saturating generator loss such as commonly used instead of minimizing ?
Not quite. Try another option.
Answer: It provides stronger gradients when generated samples are poor
Early in training, the discriminator may easily reject fake samples. The non-saturating loss usually gives the generator stronger and more useful gradients.
Question 28 of 60 · Generator · Medium
A generator maps a -dimensional latent vector to a image. What is the generator learning?
Not quite. Try another option.
Answer: A mapping from latent space to image space
The generator converts compact latent vectors into high-dimensional synthetic samples such as color images.
Question 29 of 60 · Building GAN · Medium
During a generator update, why is the discriminator commonly frozen while the generated samples are passed through it?
Not quite. Try another option.
Answer: To update the generator using discriminator feedback only
The discriminator supplies a differentiable signal, but freezing it ensures that the optimizer changes only the generator's parameters.
Question 30 of 60 · Building GAN · Medium
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?
Not quite. Try another option.
Answer: To let each network adapt to the other network's behavior
GAN training is a two-player optimization process. Alternating updates allows each network to respond to improvements made by its opponent.
Question 31 of 60 · Problems with GANs · Medium
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?
Not quite. Try another option.
Answer: Mode collapse
Mode collapse occurs when different latent inputs produce only a limited variety of outputs, ignoring several modes of the real distribution.
Question 32 of 60 · Problems with GANs · Medium
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?
Not quite. Try another option.
Answer: Reduce the discriminator's learning rate or update frequency
Weakening an overly dominant discriminator can provide more informative gradients and allow the generator to improve.
Question 33 of 60 · CycleGAN · Medium
A CycleGAN learns mappings and . Which expression represents cycle consistency for a sample ?
Not quite. Try another option.
Answer:
After translating from domain to domain using , mapping it back with should reconstruct the original sample.
Question 34 of 60 · CycleGAN · Medium
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?
Not quite. Try another option.
Answer: It can learn translation using unpaired domain datasets
CycleGAN combines adversarial and cycle-consistency losses to learn mappings between domains without requiring paired examples.
Question 35 of 60 · Adversarial FGSM · Medium
Which formula correctly defines an FGSM adversarial example for input , label , model parameters , and perturbation size ?
Not quite. Try another option.
Answer:
FGSM perturbs the input in the sign direction of the loss gradient with respect to the input, increasing the model's loss.
Question 36 of 60 · Adversarial FGSM · Medium
An FGSM attack increases from to while keeping the model and inputs unchanged. What is the most likely effect?
Not quite. Try another option.
Answer: Attack success and perturbation visibility may both increase
A larger permits stronger input changes, which can improve attack success but also make the perturbation more noticeable.
Question 37 of 60 · Use of Docker · Medium
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?
Not quite. Try another option.
Answer: A Docker volume or bind mount
Volumes and bind mounts store files outside the container's writable layer, allowing outputs to persist after the container is deleted.
Question 38 of 60 · Use of Docker · Medium
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?
Not quite. Try another option.
Answer: Install NVIDIA Container Toolkit and enable GPU access
NVIDIA Container Toolkit allows Docker containers to use host GPUs, typically with a command option such as --gpus all.
Question 39 of 60 · Model deployment on NVIDIA Server using Streamlit framework · Medium
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?
Not quite. Try another option.
Answer: Set the server address to 0.0.0.0
Binding Streamlit to 0.0.0.0 allows it to accept connections through the server's network interfaces, subject to firewall and port settings.
Question 40 of 60 · Model deployment on NVIDIA Server using Streamlit framework · Medium
A Streamlit GAN application reloads a large model onto the NVIDIA GPU after every user interaction. Which approach best reduces this repeated loading overhead?
Not quite. Try another option.
Answer: Load the model with st.cache_resource
st.cache_resource is designed to reuse expensive resources such as trained models across Streamlit reruns.
Question 41 of 60 · Introduction to generative models · Hard
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?
Not quite. Try another option.
Answer: Maximum likelihood minimizes , which becomes infinite when where .
Maximum likelihood is equivalent to minimizing forward KL. Its expectation is over real data, so assigning zero probability to a real mode incurs an unbounded penalty; reverse KL can instead favor a subset of modes.
Question 42 of 60 · Introduction to generative models · Hard
A generator transforms into , where and no observation noise is added. Why is exact likelihood evaluation generally unavailable?
Not quite. Try another option.
Answer: The generated distribution may lie on a lower-dimensional manifold without a regular density in observation space.
A lower-dimensional latent variable can induce a singular distribution supported on a manifold. Sampling remains possible, but a standard density with respect to observation-space volume may not exist.
Question 43 of 60 · Overview of GAN structure · Hard
For the original GAN value function assume the discriminator has unlimited capacity and is optimized exactly. Which result follows?
Not quite. Try another option.
Answer: and .
Pointwise optimization gives the density-ratio discriminator. Substitution into the value function yields a Jensen–Shannon divergence objective whose global minimum occurs at .
Question 44 of 60 · Overview of GAN structure · Hard
Early in training, suppose . Why is the non-saturating generator loss commonly preferred to the minimax loss ?
Not quite. Try another option.
Answer: It provides a stronger generator gradient when the discriminator confidently rejects generated samples.
When the discriminator output is near zero, the minimax loss can saturate. The non-saturating loss has the same desired equilibrium but supplies a much stronger learning signal.
Question 45 of 60 · Discriminator · Hard
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?
Not quite. Try another option.
Answer:
With a smoothed real target, . When the distributions are equal, this becomes .
Question 46 of 60 · Discriminator · Hard
In WGAN-GP, why is the penalty evaluated on interpolations between real and generated samples?
Not quite. Try another option.
Answer: It approximately enforces the critic's Lipschitz behavior in regions connecting the two sampled distributions.
The Wasserstein dual requires a -Lipschitz critic. Penalizing gradient norms on interpolated points targets regions relevant to transporting mass, although it does not prove a global constraint.
Question 47 of 60 · Generator · Hard
A transposed-convolution generator exhibits periodic checkerboard artifacts. Which architectural change most directly addresses the usual cause?
Not quite. Try another option.
Answer: Use deterministic resize upsampling followed by an ordinary convolution.
Checkerboard artifacts often arise from uneven overlap in transposed convolutions. Resize-convolution separates spatial upsampling from filtering and produces more uniform coverage.
Question 48 of 60 · Generator · Hard
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?
Not quite. Try another option.
Answer: Call the generator's evaluation mode so stored running statistics are used.
Batch normalization in training mode depends on the current batch, which is unreliable for single-sample inference. Evaluation mode uses the running statistics learned during training.
Question 49 of 60 · Building GAN · Hard
Which gradient-handling procedure is correct for a standard alternating GAN training iteration?
Not quite. Try another option.
Answer: Detach generated samples during the discriminator update; during the generator update, preserve gradients through the discriminator to the generator.
Detaching fake samples during the discriminator step avoids unnecessary generator gradients. During the generator step, discriminator parameters may be frozen, but gradients must still flow through its operations to .
Question 50 of 60 · Building GAN · Hard
A discriminator ends with a linear logit . Which implementation is the most numerically stable for binary adversarial training?
Not quite. Try another option.
Answer: Pass the raw logit directly to a loss that combines sigmoid and binary cross-entropy.
A combined logits-based loss uses stable log-sum-exp calculations. Applying sigmoid separately can create avoidable overflow, underflow, or double-sigmoid errors.
Question 51 of 60 · Problems with GANs · Hard
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?
Not quite. Try another option.
Answer: High precision and low recall
The generated samples are realistic, indicating high precision, but they cover only a small part of the data distribution, indicating low recall and mode collapse.
Question 52 of 60 · Problems with GANs · Hard
If and lie on disjoint low-dimensional manifolds and the original discriminator is optimized nearly perfectly, which phenomenon can obstruct generator learning?
Not quite. Try another option.
Answer: The Jensen–Shannon divergence becomes locally constant, allowing the discriminator to saturate and provide weak gradients.
For disjoint supports, an optimal classifier can separate the distributions perfectly, and the Jensen–Shannon divergence saturates. Wasserstein objectives can remain informative because they reflect distances between supports.
Question 53 of 60 · CycleGAN · Hard
Why do adversarial losses plus cycle consistency fail to guarantee that a learned CycleGAN mapping is semantically correct?
Not quite. Try another option.
Answer: The generators can learn an invertible but semantically arbitrary mapping, potentially hiding reconstruction information in imperceptible signals.
Cycle consistency enforces recoverability, not semantic alignment. Many bijections satisfy the cycle loss, including mappings that permute semantics or encode hidden information.
Question 54 of 60 · CycleGAN · Hard
Let and . Which identity-loss formulation is used to discourage unnecessary changes to samples already belonging to the destination domain?
Not quite. Try another option.
Answer:
A destination-domain sample should remain unchanged when passed through the generator targeting that domain: and .
Question 55 of 60 · Adversarial FGSM · Hard
Under a first-order approximation of loss , which perturbation maximizes the loss subject to ?
Not quite. Try another option.
Answer:
Maximizing the linearized loss over an ball independently pushes each coordinate to its allowed boundary in the sign of the input gradient.
Question 56 of 60 · Adversarial FGSM · Hard
To construct a targeted FGSM example classified as target class , which update is appropriate before clipping to the valid input range?
Not quite. Try another option.
Answer:
A targeted attack minimizes the loss associated with the desired target class, so it moves opposite the input-gradient sign for that target.
Question 57 of 60 · Use of Docker · Hard
A CUDA-enabled container reports that no GPU is available, although the image contains CUDA libraries. Which host-side configuration is fundamentally required?
Not quite. Try another option.
Answer: A compatible NVIDIA driver plus NVIDIA Container Toolkit, with the container launched using GPU access.
The host driver communicates with the physical GPU, while NVIDIA Container Toolkit exposes the device and driver capabilities to the container. The host does not need a matching full CUDA toolkit.
Question 58 of 60 · Use of Docker · Hard
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?
Not quite. Try another option.
Answer: Mount versioned model weights read-only at runtime while pinning the image and dependency versions.
External versioned weights can be swapped without rebuilding the application image. Read-only mounts and pinned versions preserve integrity and reproducibility.
Question 59 of 60 · Model deployment on NVIDIA Server using Streamlit framework · Hard
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?
Not quite. Try another option.
Answer: Cache the model as a resource, set evaluation mode, and run requests without gradient tracking.
st.cache_resource is suitable for expensive shared resources such as models. Evaluation mode and disabled gradient tracking reduce memory use and ensure correct inference behavior.
Question 60 of 60 · Model deployment on NVIDIA Server using Streamlit framework · Hard
Which command pattern correctly exposes a GPU-backed Streamlit application from a Docker container on server port 8501?
Not quite. Try another option.
Answer: docker run --gpus all -p 8501:8501 app streamlit run app.py --server.address=0.0.0.0 --server.port=8501
--gpus all exposes the GPU, -p publishes the port, and binding Streamlit to 0.0.0.0 makes it reachable through the container's external interface.
That's unit 6
Answer a few questions and your score shows up here.
Nearly through. Did unit 6 of INT422 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 6 of INT422 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.