Only Few Seats Left for Advanced Certification Courses on Data Science, ML & AI by E&ICT Academy IIT RoorkeeApply Now
The trained VGG16 model is available with
tensorflow.keras.applications. We have imported this as
from tensorflow.keras.applications import VGG16 in the Import Modules section.
Now let us see how we could use.
Write the following code to get the weights of the pre-trained VGG16 model.
vgg_base = VGG16(weights='imagenet', include_top=False) vgg_base.trainable=False
We have got an instance of the VGG16 model which is trained on 'imagenet' data.
Since we want to customize it for our purpose of cat-vs-noncat classification, we remove the top layers which are the dense layers.
We put the
vgg_base layers are not trainable by setting
False, so that we could use the same weights of the Convolutional layers as used in the VGG16 imagenet data.
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here