Starting from:

$29.99

Convolutional Neural Networks

C S 487/519 Applied Machine Learning
Convolutional Neural Networks
1 Objective
In this individual homework, you are required to design Convolutional Neural Networks (CNNs).
2 Requirements
2.1 Tasks
(1) (25 points) Design a CNN architecture with the following configuration and draw the CNN architecture
in a similar manner as in the notes.
• Create the first convolutional layer using kernel size 3 × 3, strides 1 × 1, valid padding mode, and
output channel size 4.
• Create the first pooling layer using max pooling with pooling size 2 × 2 and strides 2 × 2.
• Create the second convolutional layer using kernel size 3 × 3, strides 3 × 3, valid padding mode,
and output channel size 2.
• Create the second pooling layer using max pooling with pooling size 4 × 4, and strides 4 × 4 .
• Create a fully connected layer from the second pooling layer with output channel size 10.
(2) (35 points) Write code using PyTorch to implement this CNN. You can directly copy code provided in
the class and make changes.
(3) (20 points) Test your CNN using the MNIST dataset, which can be downloaded from this page. You
need to write code to read the dataset. (The textbook has the code on page 391.)
(4) (15 points) Properly analyze the performance of the CNN if you change some parameters (e.g., the
kernel size, pooling functions, etc.). Put your analysis to a report file. The answers to Q1 should also
be at the report.
(5) (5 points) Write a readme file readme.txt with detailed instructions to run your program.
2.2 Other requirements
• Your Python code should be written for Python version 3.5.2 or higher.
• Please write proper comments in your code to help the instructor and teaching assistants to understand it.
• Please properly organize your Python code (e.g., create proper classes, modules).
• You can put your code to Jupyter Notebook or a .py file.
3 Submission instructions
Put all your files (Python code, readme file, report, etc.) to a zip file named hw.zip and upload it to Canvas.
4 Grading criteria
(1) ZERO point will be given if your code does not work. Please do not submit code that
you did not test and make sure it works.
(2) The score allocation has been put beside the questions.
(3) FIVE points will be deducted if files are not submitted in the required format.
1
(4) If the total points are more than 100. Your grades will be scaled to the range of [0,100].
(5) Please make sure that you test your code thoroughly by considering all possible test cases. For this
homework, your code will NOT be tested using more datasets. Thus, it does not need to be flexible to
accept different datasets as input.
2

More products