In this task, students are required to design and train a neural network capable of classifying handwritten digits using Python and PyTorch. The assignment focuses on a multiclass classification problem, where the model must correctly identify digits from 0 to 9 using the MNIST dataset. Through this exercise, students will strengthen their understanding of neural network components such as layers, activation functions, loss functions, and evaluation techniques.
The main aim is to achieve strong prediction accuracy by building, training, and tuning a feedforward neural network. This assignment will assess your knowledge of neural network fundamentals and your ability to apply them in practice.
The MNIST dataset includes:
60,000 training images
10,000 test images
Each image contains a grayscale handwritten digit and has a resolution of 28 × 28 pixels. The following instructions outline how to prepare the dataset for model training.
Steps:
Normalization
Convert pixel values from the range 0–255 to 0–1 for numerical stability.
Reshaping
Each 28×28 image must be flattened into a one-dimensional vector of 784 values.
You will build a feedforward neural network with this structure:
Input Layer: 784 units (one for each pixel)
Hidden Layers: 1–2 layers, each containing either 128 or 256 neurons
Activation Function: ReLU for the hidden layers
Output Layer: 10 output nodes, representing the digit classes from 0–9
(Softmax used during evaluation)
Loss function: Use sparse categorical cross-entropy as the loss function since this is a multiclass classification problem with integer labels.
Optimizer: Use Adam optimizer for training.
accuracy: Monitor the model’s accuracy metric.
Train the model on the training data.
Set epochs to 10–15 and use a batch size of 32.
Use 20% of the training data as a validation set.
• Evaluate the model on the test dataset and report the accuracy.
Plot the training and validation accuracy and loss over epochs to analyze any overfitting or under-fitting.
Discuss how the number of neurons and hidden layers affects performance.
Describe any improvements attempted, such as adding dropout layers or batch normalization.
Name your report AIDI1009-24F-10827: Assignment#2 LastNameFirstName.pdf. Below is the general format of the report required:
The front page (i.e., title page) should contain only the following:
• Course #, Course Name and Date
• Your Name and ID
• Assignment # and title of the assignment
Introduce the problem to be solved:
• Problem Statement
(a) Briefly describe the problem solved in the assignment.
(b) Assumptions and Constraints
(c) Constraints could be for example using certain libraries, datasets, or a specific programming language.
Answer all questions posed in Section 3. Append the following to your answers:
(a) Plots and Graphs.
(b) Tables.
(c) Figures.
Python Code
(a) Python code for the problem
(b) Document your code.
Assessment goal: Design, implement and evaluate a feedforward neural network in Python/PyTorch to perform multiclass classification of handwritten digits (0–9) using the MNIST dataset. The task tests understanding of data preprocessing, network architecture, training, tuning, evaluation, and reporting.
Key deliverables & constraints
Use the MNIST dataset: 60,000 training images and 10,000 test images (28×28 grayscale).
Preprocess: normalize pixel values (0–1) and reshape each image to a 1D vector of 784 features.
Build a feedforward neural network with:
Input layer: 784 units
1–2 hidden layers with 128 or 256 neurons each (ReLU activation)
Output layer: 10 units (use softmax for evaluation)
Training setup:
Loss: sparse categorical cross-entropy (appropriate integer-label loss)
Optimizer: Adam
Epochs: 10–15, batch size: 32
Validation split: 20% of training data
Evaluation: report test accuracy and include plots of training/validation loss and accuracy.
Report requirements: include problem statement, assumptions, code (documented), plots/tables, and filename format.
Discuss architecture choices, overfitting/underfitting analysis, and any improvements tried (dropout, batch norm, regularization).
Before you wrap up, make sure you take advantage of the free sample solution provided on this page. It’s a great way to understand how academic concepts are applied, how structure and formatting work, and what high-quality academic writing looks like. However, remember that the sample is strictly for reference and learning purposes. Submitting it as your own work may lead to plagiarism issues, which can affect your academic record.
If you need an original, plagiarism-free assignment tailored to your exact instructions, our team of qualified academic writers is here to support you. Every custom solution is written from scratch, thoroughly researched, and aligned with your university guidelines. This ensures you receive a clean, fully authentic submission that meets your deadline and academic expectations.
Why Order a Fresh Custom-Written Assignment?
• 100% original and plagiarism-free content
• Written by subject-specific academic experts
• Structured, formatted, and referenced as per your guidelines
• Timely delivery with complete confidentiality
• Perfect for students who want clarity, accuracy, and higher grades
Plagiarism Disclaimer:
The sample provided on this page is intended only for reference, research, and learning. Do not submit the sample as your own work.
[Download Sample Solution] [Order Fresh Assignment]
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.