logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Rishi AggarwalGeneral article writing
(5/5)

851 Answers

Hire Me
expert
Bryce KimEnglish
(5/5)

946 Answers

Hire Me
expert
Sam JonesPharmacology
(5/5)

703 Answers

Hire Me
expert
Riley FarroComputer science
(/5)

946 Answers

Hire Me
Python Programming

In this assignment, you will use a technique called “data augmentation” which is often used in deep learning when the training data is small.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Assignment 3

In this assignment, you will use a technique called “data augmentation” which is often used in deep learning when the training data is small. “Data augmentation” simply means the generation of artificial data to increase the training size so that deep learning model doesn’t overfit and improves its prediction accuracy.

NOTE: data augmentation is only applied to the TRAINING SET and not to the testing set.

You are given a folder “Assignment3” which contains only dog and cat images from cifar10 data set. The following are contained in “Assignment3” folder.

 

  • train subfolder: contains 10,000 32 x 32 x 3 dog and cat training images.
  • test subfolder: contains 2,000 32 x 32 x 3 dog and cat testing images.
  • txt and test_class_labels.txt contain class labels of training and testing images, respectively. Cat is labeled ‘0’ and dog as ‘1’.

There is also a python code called “Augmentation.py”, which will create two additional images (You can create more additional images by changing the variable ‘NUM_ROTATE’ in line#31 of the code) for each original image by rotating the original image randomly with a degree between -45 degrees and 45 degrees. This script will create a folder augmentation/train/ that will contain the original images + the additional images. The rotated images’ name with start with ‘rotated’. This script will also create a file augmentation/train_class_labels.txt that contain the class labels for images in augmentation/train/.

Since this is computationally intensive, your goal is to test the cnn model (which may not be the optimal architecture) architecture, with the following layers below.

 

Layer #

layer

notes

1

2-dimensional CNN layer

32 (3,3) kernels, RELU activation

2

2-dimensional max pooling

Pooling size of (2, 2). Add batch normalization and dropout of 0.2.

3

2-dimensional CNN layer

64 (3,3) kernels, RELU activation

4

2-dimensional max pooling

Pooling size of (2, 2). Add batch normalization and dropout of 0.3.

5

Dense layer

100 nodes, RELU activation. Add batch normalization and dropout of 0.5.

6

Output layer

10 nodes, softmax activation

But, the learning rate hyperparameter in the optimizer should be varied.

  • Try three different learning rate (lr) of optimizer: 0.001, 0.005, 0.05. You can use optimizer ‘Adam’.
  • For example, to set learning rate to 0.01, simply do OPTIMIZER = Adam(lr = 0.01).

Report a table for the accuracies on the testing set (Note the testing set is same):

 

 

lr =0.05

lr =0.001

lr =0.0005

Model trained on original training data set

?

?

?

Model trained on augmented training data set

?

?

?

Plot the optimization history for the best learning rate for

  • the Model trained on original data
  • the Model trained on the augmented data

 NOTE:

Since this is binary classification:

  • The loss function should be 'binary_crossentropy'
  • The output layer should have one node with ‘Sigmoid’ activation.
  • No need to change the y_train and y_test into categorical format.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme