Module 1: Generative and Probabilistic Models
Q1. What are generative models in AI?
A1. Generative models are a class of AI models that can learn from a set of data and then generate new data that is similar to the original. For example, if we train a generative model on thousands of human faces, it can create completely new faces that look real but don’t belong to any actual person. These models are powerful because they understand the patterns and structure in the data, which helps in tasks like data synthesis, image creation, and even solving missing data problems.
Q2. Why are generative models important in AI?
A2. Generative models are important because they go beyond just recognizing or classifying data—they actually create new content. This ability is useful in many fields like healthcare (creating synthetic patient data), entertainment (generating music, art), and security (deepfake detection). They also help improve training for other AI models by generating extra training data and can be used in unsupervised or semi-supervised learning tasks where labeled data is limited.
Q3. What is probability theory and how is it related to generative modeling?
A3. Probability theory is the branch of mathematics that deals with the chance or likelihood of events happening. In generative modeling, it helps describe how likely certain data points are to occur. For example, if you’re generating sentences, the model uses probability to decide which word is most likely to come next. Generative models often try to learn the joint probability distribution of the input data, meaning how all the features and variables relate to each other in a probabilistic way.
Q4. How do generative models use probability to create data?
A4. Generative models use probability to learn how real data is distributed, and then they sample from that distribution to create new data. For example, a model might learn that in images of cats, certain shapes and colors appear more frequently. Using this knowledge, it can then create new images that follow the same patterns. Models like Variational Autoencoders (VAEs) and Gaussian Mixture Models (GMMs) are built around these probabilistic concepts.
Q5. What is a GAN (Generative Adversarial Network) and how does it work?
A5. A GAN consists of two neural networks—a generator and a discriminator—that are trained together in a competitive setup. The generator tries to create fake data that looks like real data, while the discriminator tries to tell the difference between real and fake data. As training continues, both networks get better: the generator creates more realistic data, and the discriminator becomes better at spotting fakes. Eventually, the generator gets so good that the fake data is almost indistinguishable from the real data. GANs are widely used in generating images, videos, and even audio.
Q6. What is a VAE (Variational Autoencoder) and how is it different from a GAN?
A6. A VAE is a type of autoencoder that compresses input data into a smaller, meaningful representation (latent space), and then reconstructs the data from it. What makes VAEs special is that they assume the latent space follows a probability distribution (usually Gaussian), which allows for smooth and continuous generation of new data. Unlike GANs, VAEs are more stable during training and provide a clear understanding of the data structure, but the results might be slightly blurrier compared to GANs.
Q7. What are some challenges faced by generative models?
A7. Generative models, especially GANs, face several challenges. One big issue is mode collapse, where the model generates only a few types of outputs instead of a variety. Another problem is training instability, because GANs require balancing two networks that are competing with each other. Also, generative models often need a lot of data and compute power, and ensuring the quality and diversity of generated content is difficult. Evaluating how “good” generated data is can also be a subjective and complex task.
Q8. What is a Gaussian Mixture Model (GMM)?
A8. A GMM is a probabilistic model that assumes the data is made up of a mixture of several Gaussian (normal) distributions. Each Gaussian represents a different cluster or group in the data. The model tries to learn the parameters of each distribution (like mean and variance) and how much each one contributes to the overall dataset. GMMs are useful for clustering tasks where the data isn’t clearly separated and can belong to multiple groups with different probabilities.
Q9. What is a Hidden Markov Model (HMM) and where is it used?
A9. A Hidden Markov Model is a statistical model where the system is modeled as a series of states that are not directly visible (hidden), but each state produces an observable output. The transitions between states follow a Markov process (depends only on the previous state). HMMs are widely used in time-series data like speech recognition, handwriting, bioinformatics, and language modeling because they are good at modeling sequences with hidden structure.
Q10. What is a Bayesian Network?
A10. A Bayesian Network is a type of probabilistic graphical model that represents variables and their conditional dependencies using a directed acyclic graph (DAG). Each node represents a variable, and edges show how one variable depends on another. It’s useful for decision making under uncertainty, as it allows us to compute the probability of unknown variables based on known values. Applications include medical diagnosis, risk analysis, and troubleshooting systems.
Q11. What is a Markov Random Field (MRF)?
A11. A Markov Random Field is another type of probabilistic graphical model, but it uses undirected graphs to represent dependencies between variables. It is often used in situations where variables are influenced by their neighbors, like in image processing (e.g., smoothing or denoising images). MRFs assume that a variable depends only on its immediate neighbors, which helps reduce complexity in large datasets.
Q12. What are Probabilistic Graphical Models (PGMs) and why are they useful?
A12. PGMs combine probability theory and graph theory to model complex relationships among random variables. They provide a structured way to represent and reason about uncertainty in data. Two main types of PGMs are Bayesian Networks (directed) and Markov Random Fields (undirected). These models make it easier to visualize dependencies, perform efficient inference, and make predictions even when some information is missing.
Module 2: Generative Adversarial Networks (GANs)
Q1. What is a Generative Adversarial Network (GAN)?
A1. A GAN is a type of generative model made up of two neural networks—a generator and a discriminator—that work against each other in a game-like setup. The generator tries to create fake data that looks real, while the discriminator tries to detect whether the input is real or fake. As training progresses, the generator gets better at fooling the discriminator, and the discriminator gets better at catching fake data. Eventually, the generator learns to produce very realistic outputs.
Q2. What is the role of the generator in a GAN?
A2. The generator takes in random noise (a vector of numbers) and tries to convert it into data that looks like real examples from the training set. For example, in a GAN trained on human faces, the generator turns random noise into images that resemble real human faces. The goal of the generator is to produce such good fakes that the discriminator can’t tell they’re fake.
Q3. What is the role of the discriminator in a GAN?
A3. The discriminator is like a judge. It receives both real data from the training set and fake data from the generator. Its job is to classify whether each input is real or generated. It learns to become better at identifying fake data, which pushes the generator to improve its outputs.
Q4. How is a GAN trained?
A4. GANs are trained using a back-and-forth process where both the generator and discriminator are updated in turns. First, the discriminator is trained on real and fake data to improve its ability to tell them apart. Then, the generator is updated to produce better fakes that can fool the discriminator. This loop continues until the generator creates data that the discriminator can no longer distinguish from real data.
Q5. What is Vanilla GAN architecture?
A5. The Vanilla GAN is the basic version of a GAN. It has a simple architecture with fully connected layers in both the generator and discriminator. The generator uses random noise to create outputs, and the discriminator checks if those outputs are real or fake. While it’s good for learning purposes, it’s limited in performance, especially with high-dimensional data like images.
Q6. What is a DCGAN (Deep Convolutional GAN)?
A6. A DCGAN is an improved version of the Vanilla GAN that uses convolutional layers instead of fully connected layers. This makes it much better at handling image data. The generator uses transposed convolutions to create images, and the discriminator uses regular convolutions to analyze them. DCGANs are popular for generating high-quality images and are easier to train than Vanilla GANs.
Q7. What is a WGAN (Wasserstein GAN)?
A7. A WGAN is a variation of GAN that uses a different loss function based on the Wasserstein distance (also called Earth Mover’s Distance). This makes training more stable and helps reduce problems like mode collapse. WGANs don’t use the typical binary classification for the discriminator; instead, they use a critic that scores how real the data looks.
Q8. What is a Conditional GAN (cGAN)?
A8. A Conditional GAN is a type of GAN where both the generator and discriminator get extra information, like a label or a class (e.g., “cat” or “dog”). This allows the generator to create specific types of data, like a digit ‘3’ if asked to. It gives more control over what the model generates, unlike a regular GAN which creates random outputs.
Q9. What is CycleGAN and what is it used for?
A9. A CycleGAN is a GAN used for image-to-image translation where paired training data is not available. For example, it can convert a photo of a horse into a photo of a zebra without needing exact matching pairs. It uses two generators and two discriminators and ensures that the output can be converted back to the original using a cycle consistency loss.
Q10. What are the common challenges faced while training GANs?
A10. GANs are powerful but hard to train. One major problem is training instability—if the generator or discriminator becomes too strong too quickly, training fails. Another problem is mode collapse, where the generator produces only a limited variety of outputs instead of diverse ones. Also, GANs require careful tuning of hyperparameters, and evaluating the quality of generated data is not straightforward.
Q11. What are some real-world applications of GANs?
A11. GANs have many exciting applications, especially in areas involving images and creativity. Some examples include:
- Image synthesis: Creating realistic images from scratch (e.g., fake human faces).
- Style transfer: Changing the style of an image while keeping the content (e.g., turning a photo into a painting).
- Super-resolution: Enhancing low-resolution images.
- Data augmentation: Generating more training data for machine learning models.
- Deepfakes: Creating realistic videos or faces (though this can have ethical issues)
Module 3: Variational Autoencoders (VAEs)
Q1. What is a Variational Autoencoder (VAE)?
A1. A Variational Autoencoder (VAE) is a type of neural network used for generating new data that’s similar to the training data. It is a probabilistic version of an autoencoder that learns a compressed representation of the input data (called latent space) and then reconstructs the input from it. Unlike normal autoencoders, VAEs treat encoding as a probability distribution, not just a single value, which allows them to generate more diverse and realistic outputs.
Q2. What are the basic components of a VAE?
A2. A VAE has three main components:
- Encoder – Compresses the input data into a latent space by generating parameters (mean and variance) of a probability distribution.
- Latent space – A space of vectors representing compressed knowledge of the input. VAEs sample from this space to introduce randomness and variety.
- Decoder – Reconstructs the original input data from the sampled latent vector.
Q3. How does the architecture of a VAE differ from a traditional autoencoder?
A3. In a traditional autoencoder, the encoder outputs a fixed latent vector. But in a VAE, the encoder outputs two things: a mean (μ) and a standard deviation (σ), which define a distribution in the latent space. Then, a random sample is drawn from this distribution (using a trick called reparameterization) and passed to the decoder. This allows VAEs to generate more varied and flexible outputs.
Q4. What is the VAE loss function made of?
A4. The VAE loss has two parts:
- Reconstruction Loss – Measures how close the reconstructed output is to the original input (usually using Mean Squared Error or Binary Cross-Entropy).
- KL Divergence Loss – Measures how close the learned distribution is to a standard normal distribution. It keeps the latent space well-structured and continuous.
The total loss = Reconstruction Loss + KL Divergence
Q5. What is latent space in a VAE and why is it useful?
A5. The latent space is a lower-dimensional space where complex data is represented in a compressed way. In VAEs, this space is smooth and continuous, meaning similar points in latent space generate similar outputs. This is useful for tasks like data interpolation, generation, and modifying features (e.g., changing smile, age, etc., in face images).
Q6. How are VAEs trained?
A6. VAEs are trained using backpropagation. The encoder first outputs the mean and variance of the latent space, a sample is drawn from this distribution, and the decoder tries to reconstruct the input. The loss function (reconstruction + KL divergence) is minimized during training to ensure both high-quality reconstructions and a well-behaved latent space.
Q7. What are some real-world applications of VAEs?
A7. VAEs are used in:
- Image generation – Creating new images like handwritten digits, faces, etc.
- Data compression – Storing data in compressed format.
- Anomaly detection – Reconstructing normal data well but failing on unusual data, helping in spotting anomalies.
- Drug discovery – Generating new chemical structures or molecules.
- Text generation – Used in NLP to generate meaningful sentences or phrases.
Q8. What is an undercomplete autoencoder?
A8. An undercomplete autoencoder has a latent space smaller than the input size. This forces the model to learn the most important features of the data. It’s mainly used for dimensionality reduction and feature extraction.
Q9. What is a sparse autoencoder?
A9. A sparse autoencoder adds a sparsity constraint to the loss function so that only a few neurons are active at a time. This helps in learning meaningful patterns and is useful in feature selection and image processing.
Q10. What is a contractive autoencoder?
A10. A contractive autoencoder adds a regularization term to the loss function to make the encoder less sensitive to small changes in input. This makes the model more robust and helps capture stable, low-dimensional representations.
Q11. What is a denoising autoencoder?
A11. A denoising autoencoder is trained to reconstruct the original input from a noisy version of it. This helps the model learn important features and ignore irrelevant noise, making it good for tasks like image denoising and pretraining.
Q12. How do VAEs differ from regular autoencoders in terms of generative ability?
A12. Regular autoencoders can compress and reconstruct data, but they don’t generate new samples effectively because their latent space isn’t smooth or continuous. VAEs, on the other hand, learn a probabilistic latent space that allows for smooth interpolation and the generation of new, realistic data by sampling from the distribution.
Module 4: Transfer Learning
Q1. What is Transfer Learning?
A1. Transfer Learning is a technique in machine learning where a model trained on one task is reused for another related task. Instead of training a model from scratch, we use a pre-trained model (usually trained on a large dataset like ImageNet) and adapt it to our specific problem. This saves time, reduces the need for a huge dataset, and often gives better performance, especially when data is limited.
Q2. What are the basic terminologies in Transfer Learning?
A2. Key terms in Transfer Learning include:
- Source domain: The domain where the model was originally trained (e.g., ImageNet dataset).
- Target domain: The new domain where we want to apply the model (e.g., medical images).
- Pre-trained model: A model that has already been trained on a large dataset.
- Feature extraction: Using the pre-trained model to extract useful features from new data.
- Fine-tuning: Slightly modifying and re-training the pre-trained model on new data to improve performance.
Q3. What are pre-trained models and why are they useful?
A3. Pre-trained models are neural networks trained on large datasets for general tasks like image classification or language understanding. Examples include VGG16, ResNet, BERT, GPT, etc. These models are useful because they have already learned rich and generic features that can be transferred to new tasks. This helps save training time and improves performance on smaller datasets.
Q4. What is feature extraction in Transfer Learning?
A4. In feature extraction, we use the layers of a pre-trained model (usually the convolutional layers in CNNs) to extract meaningful patterns or features from our data. We then feed these features into a new classifier layer (like a fully connected layer) to make predictions for our specific task. The pre-trained model’s weights are usually kept frozen (not updated).
Q5. What is fine-tuning in Transfer Learning?
A5. Fine-tuning involves taking a pre-trained model and continuing the training process on new data, usually with a lower learning rate. We unfreeze some or all layers and let them adjust to the new task. This improves the model’s accuracy and makes it more specialized for the target dataset, especially if it’s quite different from the original one.
Q6. How do we choose between feature extraction and fine-tuning?
A6. If the target dataset is small or similar to the source dataset, feature extraction is usually enough. But if the target dataset is large or different, fine-tuning gives better performance because the model can adapt more to the new data. Sometimes a combination of both methods is used.
Q7. What is Self-Supervised Learning in the context of Transfer Learning?
A7. Self-Supervised Learning is a type of learning where the model learns useful features without using labeled data. It generates its own labels from the input data by solving a pretext task (like predicting missing parts of an image or next word in a sentence). These features can later be transferred to real tasks (like classification) with little or no additional training. It’s becoming a strong foundation for Transfer Learning, especially in NLP and vision.
Q8. What is Meta Learning and how is it related to Transfer Learning?
A8. Meta Learning, also known as “learning to learn”, is a technique where the model learns how to adapt quickly to new tasks using only a few examples. It’s closely related to Transfer Learning because it helps models generalize across different tasks. Meta Learning is useful when we have many small tasks instead of one big one, and it’s common in few-shot learning and robotics.
Q9. What are some popular pre-trained models used in Transfer Learning?
A9. Some commonly used pre-trained models include:
- Image models: VGG, ResNet, Inception, MobileNet, EfficientNet
- Text models: BERT, GPT, RoBERTa, XLNet
These models are available through libraries like TensorFlow, PyTorch, and Hugging Face, and they make Transfer Learning much easier to apply.
Q10. What are the main benefits of using Transfer Learning?
A10. The key benefits of Transfer Learning include:
- Less training time: Reusing models saves time.
- Better performance with less data: Helps when labeled data is limited.
- Improved generalization: Pre-trained models bring knowledge from large, diverse datasets.
- Low cost: Less computation and fewer resources needed.
Overall, Transfer Learning boosts efficiency and is a powerful tool in modern AI workflows.
Module 5: Ensemble Learning
Q1. What is Ensemble Learning?
A1. Ensemble Learning is a machine learning technique where we combine multiple models (often called “weak learners”) to create a stronger, more accurate model. The idea is that a group of models working together performs better than a single one. It helps reduce errors, increases accuracy, and improves generalization.
Q2. What are Ensemble Classifiers?
A2. Ensemble classifiers are models that make predictions by aggregating the outputs of multiple individual classifiers. These individual models may not perform great alone, but when combined using methods like voting or averaging, the final model becomes more robust and accurate.
Q3. What is Bagging (Bootstrap Aggregating)?
A3. Bagging is an ensemble method that builds several models by training them on different random subsets of the training data (sampled with replacement). Then, it combines their outputs—usually by voting (for classification) or averaging (for regression).
Random Forest is a popular algorithm based on bagging, where many decision trees are trained and their outputs combined.
Q4. What is Random Forest and how does it work?
A4. Random Forest is a bagging-based ensemble that uses multiple decision trees. Each tree is trained on a random subset of data and a random subset of features. During prediction, all trees vote, and the majority vote (or average in regression) is the final output. It’s powerful, easy to use, and good for handling both classification and regression tasks.
Q5. What is Boosting in ensemble learning?
A5. Boosting is a method where models are trained sequentially, and each new model tries to correct the errors made by the previous one. The final prediction is made by combining all models, usually by weighted voting or summing their outputs. Boosting is effective for reducing bias and improving accuracy, especially on complex tasks.
Q6. What is AdaBoost and how does it work?
A6. AdaBoost (Adaptive Boosting) trains weak learners (usually decision stumps) one by one. After each round, it gives more weight to misclassified samples, forcing the next model to focus on those hard examples. In the end, it combines all learners using weighted voting. AdaBoost is sensitive to noise but performs well with clean data.
Q7. What is Stacking in ensemble learning?
A7. Stacking (Stacked Generalization) is an advanced ensemble method where multiple different models (e.g., decision tree, SVM, logistic regression) are trained, and their outputs are used as inputs for a final model called the meta-learner. The meta-learner combines these outputs to make the final prediction. It can achieve higher accuracy by capturing patterns other models miss.
Q8. What is Blending and how is it different from Stacking?
A8. Blending is similar to stacking, but it uses a validation set instead of cross-validation to train the meta-model. It’s simpler and faster than stacking but may not perform as well if the validation set isn’t representative. Both methods aim to combine the strengths of various models.
Q9. What is XGBoost and why is it popular?
A9. XGBoost (Extreme Gradient Boosting) is a high-performance boosting algorithm based on gradient boosting. It’s optimized for speed and performance, supports regularization (which helps prevent overfitting), and is widely used in Kaggle competitions. XGBoost builds trees sequentially and improves on the errors from previous trees using gradient descent.
Q10. What are the applications of XGBoost in regression and classification?
A10. XGBoost can be used for:
- Classification: Predicting categories (e.g., spam detection, disease classification).
- Regression: Predicting continuous values (e.g., house prices, stock prediction).
It supports custom loss functions, handles missing values, and works well with structured/tabular data.
Module 6: Nascent Technologies in AI
Q1. What are the limitations of 2D learning environments in AI?
A1. Traditional 2D learning environments like text, videos, and flat interfaces limit user interaction, engagement, and real-world simulation. They lack depth, spatial awareness, and immersive feedback, which are essential for tasks like robotics, surgery simulation, or virtual collaboration. As a result, learning outcomes may be less effective for complex or hands-on tasks.
Q2. How are virtual worlds and immersive technologies evolving in AI?
A2. Virtual worlds are becoming more realistic, interactive, and AI-driven. Immersive technologies like VR (Virtual Reality), AR (Augmented Reality), and XR (Extended Reality) allow users to interact with digital environments in a natural and intuitive way. AI enhances these experiences by enabling real-time interaction, intelligent agents, adaptive learning, and realistic simulations in areas like gaming, education, and training.
Q3. What is Augmented Reality (AR)?
A3. Augmented Reality (AR) is a technology that overlays digital content (like images, sounds, or 3D models) onto the real world using devices like smartphones, tablets, or AR glasses. Unlike VR, which replaces reality, AR enhances it, creating a mixed experience where digital and physical elements coexist and interact.
Q4. What is the Metaverse?
A4. The Metaverse is a virtual, shared digital space that combines AR, VR, AI, and blockchain technologies. It allows users to interact with each other and digital environments in real-time using avatars. It’s like a next-generation version of the internet that’s 3D, immersive, and persistent, supporting activities like work, play, learning, and shopping.
Q5. What are the key characteristics of the Metaverse?
A5. Key features of the Metaverse include:
- Persistence: The environment continues to exist even when users leave.
- Real-time interaction: Multiple users can interact in real-time.
- Immersiveness: Uses VR/AR for realistic experiences.
- Interoperability: Digital assets, avatars, and currencies can move across platforms.
- User-generated content: Users can create and own digital items, spaces, or economies.
Q6. What are the main components of the Metaverse?
A6. The Metaverse consists of:
- Virtual environments: Simulated worlds where users interact.
- Avatars: Digital representations of users.
- Hardware: Devices like VR headsets, AR glasses, motion sensors.
- Software platforms: Engines like Unity or Unreal for building 3D experiences.
- Economy layer: Digital currencies, NFTs, and blockchain for ownership and trade.
- AI: Powers virtual assistants, NPCs, and adaptive systems.
Q7. What are the challenges in building the Metaverse?
A7. Major challenges include:
- Technological limitations: Hardware is expensive and not yet widely adopted.
- Privacy and security: Protecting data in a highly connected world.
- Standardization: Lack of common protocols for interoperability.
- Digital divide: Not everyone has access to immersive tech.
- Addiction and mental health: Overuse of immersive worlds may affect well-being.
Q8. What opportunities does the Metaverse offer for AI and society?
A8. The Metaverse opens up new possibilities such as:
- Immersive education and training (e.g., virtual classrooms, simulations).
- Virtual workspaces for remote collaboration.
- Healthcare simulations for surgeries or therapy.
- AI-driven experiences like intelligent NPCs or virtual assistants.
- New economies via digital assets, NFTs, and virtual real estate.
Q9. What are emerging quantum paradigms in AI?
A9. Quantum paradigms refer to combining quantum computing with AI. Quantum computers can perform certain tasks much faster than classical computers using qubits and quantum mechanics principles. This can benefit AI in:
- Optimization problems
- Big data analysis
- Training deep neural networks faster
Although still early in development, quantum AI has the potential to revolutionize areas like drug discovery, cryptography, and materials science.
Q10. How is AI expected to evolve with these nascent technologies?
A10. AI is becoming more context-aware, adaptive, and integrated into real-world environments. With technologies like AR, VR, the Metaverse, and quantum computing, AI will:
- Create hyper-personalized experiences.
- Enable real-time human-machine collaboration.
- Solve complex problems faster.
- Drive innovation in education, healthcare, entertainment, and smart cities.
Suggested Experiments Viva Questions & Answers
Q1. What is a Hidden Markov Model and how did you implement it?
A1. A Hidden Markov Model (HMM) is a statistical model used when we have hidden (unobserved) states affecting visible outcomes. It’s useful in sequence-based predictions like speech or weather. I implemented it using libraries like hmmlearn
or from scratch in Python, where I defined the states, transition probabilities, emission probabilities, and used the Viterbi algorithm to predict the most likely sequence of hidden states based on observed data.
Q2. How does a Bayesian Network work and how did you implement it?
A2. A Bayesian Network is a probabilistic graphical model that represents variables and their conditional dependencies using a directed acyclic graph (DAG). I used Python’s pgmpy
library to define nodes (variables), edges (dependencies), and conditional probability tables. Then, I used inference to predict the outcome based on given evidence.
Q3. What is a Gaussian Mixture Model and how did you use it for prediction?
A3. A Gaussian Mixture Model (GMM) represents data as a mixture of multiple Gaussian distributions. It’s used for clustering or density estimation. I used the sklearn.mixture.GaussianMixture
class to fit the model to a dataset and predict the likelihood of data belonging to different clusters.
Q4. What is a Generative Multi-Layer Network Model and how did you build it?
A4. A Generative Multi-Layer Network is a type of neural network (like a basic GAN or autoencoder) used to generate new data samples. I used TensorFlow/Keras to build a multi-layer generator and discriminator model, trained it on a dataset like MNIST, and generated new synthetic data after training.
Q5. What is a DCGAN and how did you implement it?
A5. DCGAN (Deep Convolutional GAN) is an improved version of GAN that uses convolutional layers, making it better at generating images. I used TensorFlow or PyTorch to build a generator and discriminator using Conv2D and Conv2DTranspose layers. I trained it on an image dataset (like CIFAR-10 or MNIST) to generate realistic-looking images.
Q6. What is Conditional GAN (CGAN) and how does it differ from a normal GAN?
A6. CGANs are GANs with a condition, like a label, added to both the generator and discriminator. This allows controlled image generation. For example, generating digits 0-9 specifically in MNIST. I implemented it by feeding both noise and label information into the generator, and image-label pairs into the discriminator.
Q7. How did you train a Variational Autoencoder (VAE) and what was the dataset?
A7. I used TensorFlow/Keras to build a VAE using encoder, decoder, and a latent space with mean and variance layers. The loss function included both reconstruction loss and KL divergence. I trained it on the Fashion MNIST dataset to generate new fashion item images.
Q8. How did you explore a pre-trained model and what was the result?
A8. I used a pre-trained model like VGG16 or ResNet50 from Keras Applications. I loaded it with pre-trained weights (on ImageNet), extracted features from a custom dataset, and used those for classification. This helped me understand how Transfer Learning works and how feature extraction improves model performance.
Q9. What is LIME and how did you implement it?
A9. LIME (Local Interpretable Model-Agnostic Explanations) explains predictions of any black-box model by approximating it with a simpler, interpretable model locally. I trained a classifier (like a random forest), used the lime
Python package to explain a prediction on a test sample, and visualized which features contributed most to the decision.