EE 634/734 Introduction to Neural Networks
In this assignment, we will learn about developing deep neural networks, using the “dogs-vs-cats”
dataset. The dataset consists of 25,000 JPG images stored in the folder “PetImages”, divided equally in
two sub-folders called “Dog” and “Cat”.
1. Studying the impact of the dataset size on the accuracy of the neural network model: Use the
network developed in class to experiment with dataset sizes of 15K, 20K and 25K. Provide the
code and comment on the results.
2. Studying the impact of the model’s architecture used on the model’s accuracy: Choose a
reasonable size of images, between 15k and 25K, from the dataset to answer this question.
Implement two different neural network architectures using a combination of convolutional,
pooling, and dense layers. The architectural models should have a minimum of 5 layers. Report
on the results obtained in each case.
3. Studying the impact of image resolution on the model’s accuracy: using a dataset size of your
choosing (15K, 20K, or 25K) and one of the two model architecture from question 2, report on
the accuracy achieved when using image resolutions of 80×80, 120×120, and 200×200.
4. Fine-tuning the hyperparameters of a model: start by selecting the size of the dataset, an
architectural model, and image resolution for training the model. Use Tensorboard in a “grid
search” approach for finding optimal values for the hyperparameters.
5. Training the model by reading images directly from the disk: Using the optimal set of
hyperparameters from question 4, demonstrate the use of the ImageDataGenerator class to
feed the model with images from the disk during the model training process. The only image
transformation to use here is the pixel value scaling to normalize it from 0-255 to 0.0-1.0. Show
a plot of the accuracy and loss values as a function of the number of epochs during training. The
following is a sample code:
train_datagen = ImageDataGenerator(
rescale = 1.0/255.0,
train_iter = train_datagen.flow_from_directory(
directory = train_path,
class_mode = ‘binary’,
batch_size = batch_size,
target_size = (IMG_SIZE, IMG_SIZE)
test_datagen = ImageDataGenerator(rescale=1.0/255.0)
本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！
E-mail: [email protected] 微信:itcsdx