0% found this document useful (0 votes)
13 views

PRML-Lab01

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

PRML-Lab01

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Pattern Recognition and Machine Learning

Lab Assignment – 01

TA’s information:

Email: [email protected]

Deadline: 23:59 - 28/11/2023.

Objective: The goal of this exercise is to provide hands-on experience in implementing a


Convolutional Neural Network (CNN) using PyTorch. By completing this exercise, students will
gain a better understanding of the key concepts behind CNNs, the PyTorch framework, and
how to design and train a simple CNN for image classification.

Requirements:

1. Dataset: Utilize a well-known dataset for image classification, such as CIFAR-10 or


ImageNet, MNIST. You can choose one based on the complexity level you desire for the
exercise.

2. PyTorch: Implement the CNN using PyTorch, taking advantage of its powerful
functionalities for building neural networks.

3. Model Architecture: Design a unique CNN architecture. Your architecture should


include at least three convolutional layers, activation functions (e.g., ReLU), and pooling
layers. Experiment with the number of layers, filter sizes, and any innovative elements
that you believe will contribute to the model's performance.

4. Data augmentation: Implement data augmentation techniques to enhance the model's


robustness.

5. Loss Function and Optimizer: Choose an appropriate loss function (e.g.,


CrossEntropyLoss) and optimizer (e.g., Adam or SGD) for the classification task.

6. Training Loop: Implement the training loop to train the CNN on the training dataset.
Monitor the training loss and accuracy.

7. Validation: After training, evaluate the model on a separate validation dataset to assess
its generalization performance.

8. Hyperparameter Tuning: Experiment with hyperparameter settings, such as learning


rate, batch size, and the number of filters in the convolutional layers, to observe their
impact on the model's performance.
9. Results and Analysis: Provide a summary of the model's performance, including
accuracy and loss on both the training and validation sets. Analyze the results and
discuss any observations or challenges encountered during the implementation.

Encouragement for Experimentation:

• We encourage students to leverage platforms like Google Colab for experimenting with
the CNN implementation. Google Colab provides free access to GPU resources,
facilitating faster model training and experimentation. If you don’t know how to use
Google Colab, contact to Teaching Assistant for helping as soon as posible.

Note on Academic Integrity:

• Plagiarism Warning: Students are strictly prohibited from copying or reproducing the
solution code from their peers or any external sources. Each submission must be the
individual work of the student. Any instances of plagiarism or copying will result in a
grade of 0 points for the assignment.

Submission Guidelines:

• Submit the Python code for the implemented CNN in a well-documented Jupyter
Notebook named as following format: PRML01_StudentID_Name.ipynb, for example,
PRML01_22110075_NguyenVanA.ipynb.

• Include comments explaining key parts of the code.

• Provide a brief written analysis of the results and any insights gained from the exercise.

• Submit the notebook at: https://forms.gle/sPyj6Ev1TYjLDfK36

You might also like