Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A neural network designed using Tensorflow Keras is given below. net = t f . ke ras . l a y e r s .

A neural network designed using Tensorflow Keras is given below.
net = t f . ke ras . l a y e r s . Se quent i a l ()
net . add (
t f . ke ras . l a y e r s . InputLayer ( input_shape =((256*256*3),)),
t f . ke ras . l a y e r s . Dense (1048, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dense (512, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dropout (0.4),
t f . ke ras . l a y e r s . Dense (256, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dense (128, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dense (64, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dropout (0.6),
t f . ke ras . l a y e r s . Dense (32, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dense (16, a c t i v a t i o n= r e lu ),
t f . ke ras . l a y e r s . Dense (8, a c t i v a t i o n=softmax ))
(a) What is the objective of the neural network? What is the input given to the network?
What is the expected output? How deep and wide is the network. [2]
(b) Justify the choice activation function in output layer. Instead of Relu activation function,
justify the choice of using Tanh activation function. [1]
(c) Two dropout statements are added in the code. How many additional parameters are
learned because of this? If drop out is added after the last statement in the given code,
how will it affect the network? [1]
(d) Write the code snippet for adding the optimizer of your choice. Justify the choice of
the optimizer. Assume any other relevant information. [1]
(e) What will the following code snippet do to the network. [1]
cb = t f . ke ras . c a l l b a c k s . EarlyStopping (monitor= l o s s , pa t i enc e=7)
h i s t o r y = net . f i t ( epochs=200, batch_size=32, c a l l b a c k s =[cb ]) for above program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

Define ergonomics and give an example of a good or bad experience

Answered: 1 week ago