Question: Assignment # 1 : Building a Convolutional Neural Network - Model 2 Architecture Submitted on : 2 6 th September 2 0 2 4 @

Assignment #1 : Building a Convolutional Neural Network - Model 2 Architecture
Submitted on :26th September 2024 @ 11:59 PM Total mark (20%)
Objective:
The goal of this assignment is to build and compile a convolutional neural network (CNN) with four convolutional block, each having a Conv2D, MaxPooling2D, and a Dropout layer. You will also initialize an Adam optimizer and compile the model using the following configurations:
Assignment Instructions:
1. ModelArchitecture:ImplementtheCNNarchitecturewiththefollowing
configuration:
o Conv2D Block 1:
Conv2Dlayerwith256filters,a5x5kernel,'same'padding,and'relu' activation.
Inputshape=(150,150,3)forthefirstConv2Dlayer.
MaxPooling2Dlayerwitha2x2kernelandstridesizeof2x2.
Dropoutlayerwitha0.25dropoutratio.
o Conv2D Block 2:
Conv2Dlayerwith128filters,a5x5kernel,'same'padding,and'relu'
activation.
MaxPooling2Dlayerwitha2x2kernelandstridesizeof2x2. Dropoutlayerwitha0.25dropoutratio.
o Conv2D Block 3:
Conv2Dlayerwith64filters,a3x3kernel,'same'padding,and'relu'
activation.
MaxPooling2Dlayerwitha2x2kernelandstridesizeof2x2. Dropoutlayerwitha0.25dropoutratio.
o Conv2D Block 4:
Conv2Dlayerwith32filters,a3x3kernel,'same'padding,and'relu'
activation.
MaxPooling2Dlayerwitha2x2kernelandstridesizeof2x2. Dropoutlayerwitha0.25dropoutratio.
2. FlattenandFullyConnectedLayers:
o Add a Flatten layer to convert the output of the final convolutional block into
a 1D tensor.
o Add a fully connected Dense layer with 64 neurons and 'relu' activation. o Add another fully connected Dense layer with 32 neurons and 'relu'
activation.
o Add a final Dense layer with 3 neurons and 'softmax' activation (for multi- class classification).
3. OptimizerandModelCompilation:
o Initialize an Adam optimizer with a learning rate of 0.001. o Compile the model using:
Lossfunction:categorical_crossentropy.
Metrics:accuracy.
4. ModelSummaryandObservations:
o After building and compiling the model, print the model summary.
o Write down your observations based on the model architecture, including
the number of parameters in each layer and the overall complexity of the
model. 5. Submission:
o Submit your Python code that implements the above architecture. o Provide your observations along with the model summary.
Assessment Criteria:
1. Correctness(50%):
o The model architecture is correctly implemented as per the instructions. o All layers and configurations (filters, kernel size, dropout ratio, etc.) are
appropriately defined. 2. ModelCompilation(20%):
o The model is compiled correctly with the specified optimizer, loss function, and metric.
3. Observations(20%):
o Clear and insightful observations are provided based on the model
summary.
4. CodeOrganizationandClarity(10%):
o The code is well-structured, with proper comments and explanations for each step.
Optional Extension:
For additional credit, you can experiment with different learning rates, optimizers, or activation functions and observe how these changes affect the model's performance.
General Tips for Submitting Python Assignments:
Comment your code: Include comments explaining your logic and code structure to make it easier for your instructor to understand.
Test your code: Ensure the Python script runs without errors before submitting.
Submit on the blackboard 2 files format in the original code with compiled
results in: .ipynb and PDF file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!