Python代写|CNN Programming Assignment3

这是一个英国的Python CNN数字分类作业代写

Problem 1 – Code a Convolutional Neural Network (CNN) Keras Model [70 points] Create a
python file named as A3_P1_[your AccessID].py and train a Convolutional Neural Network in
Keras Model for digit classification task.

Part 1 [5 points] Load the MNIST dataset by using TensorFlow datasets.

Part 2 [35 points] Use functional API in TensorFlow to create a Keras model named
CNN. The structure is listed below:

Part 3 [10 points] Use Adam optimizer with a 0.0001 learning rate, categorical cross
entropy loss, and categorical accuracy to compile the model.

Part 4 [10 points] Train your model for 10 epochs with a batch size of 128. Make a
screenshot of your training procedure to A3_P1_[your AccessID].jpg

Part 5 [10 points] Use your testing dataset to evaluate your trained model then save your
model as A3_P1_[your AccessID].model. Your accuracy must be higher than 98%. Report your
accuracy as a comment in your .py file. Submit all your files to Canvas.

Problem 2 – Fine tune your model with dataset USPS [30 points] Fine tuning is a technique
used in deep learning to avoid training a model from sketch with a small dataset. More
information for Fine-tuning can be found at tuning. Download
USPS dataset from Canvas and from Canvas and rename .py file as A3_P2_[your
AccessID].py. Code the missing part in the python file.

Part 1 [10 points] Restore the model you saved in Problem 1.

Part 2 [10 points] Test the restored model with both MNIST and USPS testing samples,
batch-size 128. Report mini-batch testing accuracy as a comment in your .py file.

Part 3 [5 points] Train you CNN with USPS training samples for 5 epochs batch size

Part 4 [5 points] Test your fine-tuned CNN on USPS testing data and report testing
accuracy with comment in your .py file. Your accuracy must be higher than 98%.
Submit all your files to Canvas.