MATH7017: Probabilistic Models and Inference

Probabilistic Models and Inference

MATH7017: Probabilistic Models and Inference, Project 2023                    (total: 40 points)

Conditional Generation with Variational Autoencoders and Generative Adversarial Networks Overview

In this project, you will work with Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs). You will build and train conditional versions of these models to generate MNIST digits given a digit class (see also Labels improve subjective sample quality, in week 12).

Objectives

  1. Conditional Variational Autoencoder (C-VAE): Implement a Conditional VAE that takes an MNIST image and its associated label as input. The model should learn to generate new images that resemble the input image given a class label.
  2. Conditional Generative Adversarial Network (C-GAN): Implement a Conditional GAN that takes a random noise vector and a class label as input to the generator, and produces a digit of the specified class. The discriminator should also be conditioned on the class label.
  3. Model Comparison: Compare the performance of the two models. Discuss their strengths and weaknesses, and compare the quality of the generated samples. Use both qualitative (visual) and quantitative measures (if possible) for this comparison.
  4. Extra Challenge (Optional): Experiment with different architectures, training strate- gies, and techniques for improving the quality and diversity of the generated images (such as different types of regularisation, different architectures, etc.). Document your findings and provide explanations for the observed results.

Deliverables

  1. Code: Well-commented Python scripts or Jupyter notebooks for both the C-VAE and C- GAN implementations. The code should include data loading, model definition, training loop, and a testing routine to generate new samples given class labels.
  2. Report: A brief report that includes the following:
    1. Model descriptions: An overview of the implemented models, including the chosen ar- chitectures and specific implementation details. Provide references to external sources and texts.
    1. Training details: Information about the training process, such as loss curves, training times, and any issues encountered.
    1. Results: Include generated samples from both models, and any quantitative results if computed.
    • Discussion: A comparison of the models, any insights gained from the project, and suggestions for future work or improvements.

The key goal of this project is not only to implement the models, but to gain a deeper understand- ing of VAEs and GANs, how conditioning on labels affects their performance, and the trade-offs between the two models.

Hints

Encoding the labels

One-hot encoding is a way of representing categorical variables as binary vectors. In the context of the MNIST dataset, the label of an image is an integer from 0 to 9 representing the digit. In one-hot encoding, each of these labels is transformed into a binary vector of size 10 (since we have 10 classes), where the position corresponding to the digit is set to 1, and all other positions are set to 0.

A simple example using PyTorch:

def  to o n e h o t ( l a b e l s ,  num c lasses ) :

return torch . eye ( num c lasses ) [ l a b e l s ]

If you run to one hot(torch.tensor([0, 2, 9]), 10), it will return a tensor of shape (3, 10) where each row is a one-hot encoded vector representing the respective label:

te n s o r ( [ [ 1 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ] ,
[ 0 . ,0 . ,1 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ] ,
[ 0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,0 . ,1 . ] ] )

Using One-Hot Encoded Labels in Conditional Models

In a conditional VAE or GAN, you want the model to generate data given a certain condition. In this case, the condition is the class label of the digit to be generated.

In a C-VAE, the one-hot encoded label is typically concatenated with the input image when feeding it into the encoder, and concatenated with the latent vector when feeding it into the decoder. This allows the VAE to learn a latent space that’s not just based on the input image, but also the class label.

In a C-GAN, the one-hot encoded label is typically concatenated with the noise vector when feeding it into the generator, and with the image (real or fake) when feeding it into the dis- criminator. This allows the generator to create images based on the class label, and allows the discriminator to evaluate images based on the class label.

Remember that the purpose of conditioning is to allow the model to generate data that adheres to a specific condition. By providing the class label as an input to the model, the model can learn to generate data that’s specific to each class.

Submit all your answers in two files to vUWS: your program code (as .py or python notebook), and a report as a PDF (preferably written in LATEX, word processors like Word/Pages are also acceptable). Please include your name and student ID in all your files. Do not zip/rar/compress the file, and do not send your LATEX or Word documents, just the PDFs.

Late answers and submissions by email will NOT be accepted.

Make use of multiple submissions to prevent a single late submission. Your last submission before the deadline will be marked. Give yourself time to submit the result – don’t wait till last minute.

Marking:

1.    Implementation of Conditional Variational Autoencoder (C-VAE) – 10 points

  • Correct implementation of the model architecture and conditioning on labels (5 points)
    • Successful training of the model and generating new samples given class labels (5 points)

2.    Implementation of Conditional Generative Adversarial Network (C-GAN) – 10 points

  • Correct implementation of the model architecture and conditioning on labels (5 points)
    • Successful training of the model and generating new samples given class labels (5 points)

3.    Report – 20 points

  • Clear and comprehensive description of the implemented models, training details, and results (6 points)
    • Detailed and insightful comparison of the models, including qualitative and quantita- tive metrics (6 points)
    • Discussion of challenges, interesting observations, and suggestions for future work or improvements (6 points)
    • Correct grammar, spelling, and presentation (2 points)
Order Now

Get expert help for Probabilistic Models and Inference and many more. 24X7 help, plag free solution. Order online now!

Universal Assignment (March 19, 2024) MATH7017: Probabilistic Models and Inference. Retrieved from https://universalassignment.com/math7017-probabilistic-models-and-inference/.
"MATH7017: Probabilistic Models and Inference." Universal Assignment - March 19, 2024, https://universalassignment.com/math7017-probabilistic-models-and-inference/
Universal Assignment June 1, 2023 MATH7017: Probabilistic Models and Inference., viewed March 19, 2024,<https://universalassignment.com/math7017-probabilistic-models-and-inference/>
Universal Assignment - MATH7017: Probabilistic Models and Inference. [Internet]. [Accessed March 19, 2024]. Available from: https://universalassignment.com/math7017-probabilistic-models-and-inference/
"MATH7017: Probabilistic Models and Inference." Universal Assignment - Accessed March 19, 2024. https://universalassignment.com/math7017-probabilistic-models-and-inference/
"MATH7017: Probabilistic Models and Inference." Universal Assignment [Online]. Available: https://universalassignment.com/math7017-probabilistic-models-and-inference/. [Accessed: March 19, 2024]

Please note along with our service, we will provide you with the following deliverables:

Please do not hesitate to put forward any queries regarding the service provision.

We look forward to having you on board with us.

Categories

Get 90%* Discount on Assignment Help

Most Frequent Questions & Answers

Universal Assignment Services is the best place to get help in your all kind of assignment help. We have 172+ experts available, who can help you to get HD+ grades. We also provide Free Plag report, Free Revisions,Best Price in the industry guaranteed.

We provide all kinds of assignmednt help, Report writing, Essay Writing, Dissertations, Thesis writing, Research Proposal, Research Report, Home work help, Question Answers help, Case studies, mathematical and Statistical tasks, Website development, Android application, Resume/CV writing, SOP(Statement of Purpose) Writing, Blog/Article, Poster making and so on.

We are available round the clock, 24X7, 365 days. You can appach us to our Whatsapp number +1 (613)778 8542 or email to info@universalassignment.com . We provide Free revision policy, if you need and revisions to be done on the task, we will do the same for you as soon as possible.

We provide services mainly to all major institutes and Universities in Australia, Canada, China, Malaysia, India, South Africa, New Zealand, Singapore, the United Arab Emirates, the United Kingdom, and the United States.

We provide lucrative discounts from 28% to 70% as per the wordcount, Technicality, Deadline and the number of your previous assignments done with us.

After your assignment request our team will check and update you the best suitable service for you alongwith the charges for the task. After confirmation and payment team will start the work and provide the task as per the deadline.

Yes, we will provide Plagirism free task and a free turnitin report along with the task without any extra cost.

No, if the main requirement is same, you don’t have to pay any additional amount. But it there is a additional requirement, then you have to pay the balance amount in order to get the revised solution.

The Fees are as minimum as $10 per page(1 page=250 words) and in case of a big task, we provide huge discounts.

We accept all the major Credit and Debit Cards for the payment. We do accept Paypal also.

Popular Assignments

Bsc Public Health and Health Promotion (Top up) LSC LONDON

Health and Work Assignment Brief.                 Assessment brief: A case study of 4,000 words (weighted at 100%) Students will present a series of complementary pieces of written work that:   a) analyse the key workplace issues; b) evaluate current or proposed strategies for managing them from a public health/health promotion perspective

Read More »

6HW109 Environmental Management and Sustainable Health

ASSESSMENT BRIEF MODULE CODE: 6HW109 MODULE TITLE: Environmental Management and Sustainable Health MODULE LEADER: XXXXXXXXX ACADEMIC YEAR: 2022-23 1        Demonstrate a critical awareness of the concept of Environmental Management linked to Health 2        Critically analyse climate change and health public policies. 3        Demonstrate a critical awareness of the concept of

Read More »

PROFESSIONAL SECURE NETWORKS COCS71196

PROFESSIONAL SECURE NETWORKS– Case Study Assessment Information Module Title: PROFESSIONAL SECURE NETWORKS   Module Code: COCS71196 Submission Deadline: 10th May 2024 by 3:30pm Instructions to candidates This assignment is one of two parts of the formal assessment for COCS71196 and is therefore compulsory. The assignment is weighted at 50% of

Read More »

CYBERCRIME FORENSIC ANALYSIS – COCS71193

CYBERCRIME FORENSIC ANALYSIS – COCS71193 Assignment Specification Weighted at 100% of the module mark. Learning Outcomes being assessed by this portfolio. Submission Deadline: Monday 6th May 2024, 1600Hrs. Requirements & Marking Scheme General Guidelines: This is an individual assessment comprised of four parts and is weighted at 100% of the

Read More »

Social Media Campaigns (SMC) Spring 2024 – Winter 2024

Unit: Dynamic Websites Assignment title: Social Media Campaigns (SMC) Spring 2024 – Winter 2024 Students must not use templates that they have not designed or created in this module assessment. This includes website building applications, free HTML5 website templates, or any software that is available to them to help with

Read More »

ABCJ3103 NEWS WRITING AND REPORTING Assignment

ASSIGNMENT/ TUGASAN _________________________________________________________________________ ABCJ3103 NEWS WRITING AND REPORTING PENULISAN DAN PELAPORAN BERITA JANUARY 2024 SEMESTER SPECIFIC INSTRUCTION / ARAHAN KHUSUS Jawab dalam bahasa Melayu atau bahasa Inggeris. Jumlah patah perkataan: 2500 – 3000 patah perkataan tidak termasuk rujukan. Hantar tugasan SEKALI sahaja dalam PELBAGAIfail. Tugasan ini dihantar secara ONLINE. Tarikh

Read More »

ABCM2103 INFORMATION TECHNOLOGY, MEDIA AND SOCIETY Assignment

ASSIGNMENT/ TUGASAN _________________________________________________________________________ ABCM2103 INFORMATION TECHNOLOGY, MEDIA AND SOCIETY TEKNOLOGI MAKLUMAT, MEDIA DAN MASYARAKAT JANUARY 2021 SPECIFIC INSTRUCTION / ARAHAN KHUSUS Jawab dalam Bahasa Melayu atau Bahasa Inggeris. Jumlah patah perkataan : 2500 – 3000 patah perkataan tidak termasuk rujukan. Hantar tugasan SEKALI sahaja dalam SATU fail. Tugasan ini dihantar

Read More »

ABCR3203 COMMUNICATION LAW Assignment

ASSIGNMENT/ TUGASAN _________________________________________________________________________ ABCR3203 COMMUNICATION LAW UNDANG-UNDANG KOMUNIKASI JANUARY 2024 SEMESTER SPECIFIC INSTRUCTION / ARAHAN KHUSUS Jawab dalam Bahasa Melayu atau Bahasa Inggeris. Jumlah patah perkataan : 2500 – 3000 patah perkataan tidak termasuk rujukan. Hantar tugasan SEKALI sahaja dalam SATU fail. Tugasan ini dihantar secara ONLINE. Tarikh penghantaran        :

Read More »

ORGANISATIONAL STRATEGY PLANNING AND MANAGEMENT ASSIGNMENT

POSTGRADUATE DIPLOMA IN BUSINESS MANAGEMENT ORGANISATIONAL STRATEGY PLANNING AND MANAGEMENT ASSIGNMENT NOTE: At postgraduate level, you are expected to substantiate your answers with evidence from independent research. INTRODUCTION TO THE ASSIGNMENT • This assignment consists of FOUR compulsory questions. Please answer all of them. • When you answer, preferably use

Read More »

Solution: Scenario 1, Mirror therapy in patients post stroke

Title: Scenario 1, Mirror therapy in patients post stroke Part 1 : Summary Ramachandran and colleagues developed mirror therapy to treat amputees’ agony from phantom limbs. Patients were able to feel their amputated limb without experiencing any pain by presenting them a mirror image of their healthy arm. Since then,

Read More »

Solution: Exploring the Dominance of Silence

Slide 1: Title – Exploring the Dominance of Silence The title, “Exploring the Dominance of Silence,” sets the stage for a deep dive into the portrayal of silence in Philip K. Dick’s “Do Androids Dream of Electric Sheep?” Our presentation will dissect the literary techniques used by the author to

Read More »

Solution: Assessment: Critical Reflection S2 2023

The policies that hampered the cultural survival of Indigenous groups have a major effect on their health (Coffin, 2007). Cultural isolation can cause an identity crisis and a sense of loss, which can exacerbate mental health problems. Indigenous people have greater rates of chronic illness and impairment due to historical

Read More »

Solution: The Market – Product and Competition Analysis

Section 1: The Market – Product and Competition Analysis Industry and Competition Analysis: The baking mix market is very competitive, but My Better Batch is entering it anyhow. The prepackaged baking mixes sold in this market allow busy people to have bakery-quality products on the table quickly without sacrificing quality

Read More »

Solution: PDCA model for Riot

Student Name: Student ID: University Name: Date: Learning Outcome 1: Engage actively in recognizing a new product/service for Riot and detect the vital tasks required for its effective growth. In this comprehensive learning outcome, Riot’s progress towards innovation superiority is characterized by a deliberate scheme that draws on components from

Read More »

Solution: EDEN 100 – ASSIGNMENT 1

Part 1: Reflections on the Register Variables Use the questions in Column 1 and analyse the sample oral interactions provided under the assessment tile. The transcript for Viv’s conversation is provided on pages 4-5. Probe Questions  Link to readings and theory Interaction 1 Interaction 2 PART 1 – ANALYSING THE

Read More »

Solution: TCP/IP Questions

Table of Contents Question 1. 1 1. IPSec datagram protocol 1 2. Source and destination IP addresses in original IP datagram.. 1 3. Source and destination IP addresses in new IP header 2 4. Protocol number in the protocol field of the new IP header 2 5. Information and Bob.

Read More »

Solution: Fundamentals of Employment Assistance Program and Counselling

ASSESSMENT 3 Subject: Fundamentals of Employment Assistance Program and Counselling Case study Question 1 a)     Major Issues for Theo that could be addressed in counselling: b)    Issues to Address First in Short-Term Counselling:             The cognitive processes of memory, focus, and decision-making are all impacted by insufficient sleep. Such cognitive

Read More »

Solution: EQUITY AND INCLUSION IN EARLY CHILDHOOD IN AUSTRALIA

Written Policy Recommendation Name: Student Number: Email: Date: Introduction: The early years of a child’s life are important for their holistic development, making early childhood education a foundation for their future accomplishments. Nevertheless, guaranteeing equality and inclusion in early childhood education stays a major problem in our society. This policy

Read More »

Solution: Report Health Issue

Table of Contents Executive Summary                                                                                                   3 Introduction                                                                                                                5 Examination of the Chosen Health Issue in the Context of Lambeth                        5 Application of Health Inequality Framework and Analysis of Determinants: Psychotropic Drug Use in Lambeth                                                                           6 Exploration and Discussion of Strategies to Manage Psychotropic Drug Use in Lambeth                                                                                                                        7 Conclusion                                                                                                                  8

Read More »

Solution: Section III: Marketing

Section III: Marketing Channels for Advertising: Understanding Who Makes Baking Product Purchase Decisions is Crucial for My Better Batch’s Business Success (Sampson et al, 2017). Home bakers may make up a disproportionate share of the decision-makers in the UK. As a result, My Better Batch has to target people, especially

Read More »

Solution: Analytics Project Project Management Plan

Analytics Project Project Management Plan Date: 22-10-2023 Author: Name Here Version: 2.0 Project Management Plan (PMP) This project management plan will outline the strategies and plans used to manage ‘analytics project’ for the Style-Hub organization. It will include the tasks such as project governance, management, planning, budget and controlling. It

Read More »

Solution: Report Health Issue

Table of Contents Executive Summary                                                                                                   3 Introduction                                                                                                                5 Examination of the Chosen Health Issue in the Context of Lambeth                        5 Application of Health Inequality Framework and Analysis of Determinants: Psychotropic Drug Use in Lambeth                                                                           6 Exploration and Discussion of Strategies to Manage Psychotropic Drug Use in Lambeth                                                                                                                        7 Conclusion                                                                                                                  8

Read More »

Solution: Mirror therapy in patients post stroke

Title: Scenario 1, Mirror therapy in patients post stroke Part 1 : Summary Ramachandran and colleagues developed mirror therapy to treat amputees’ agony from phantom limbs. Patients were able to feel their amputated limb without experiencing any pain by presenting them a mirror image of their healthy arm. Since then,

Read More »

Can't Find Your Assignment?

Open chat
1
Free Assistance
Universal Assignment
Hello 👋
How can we help you?