in this casebecause the imagenet class set contains multiple dog and cat classesit' likely to be beneficial to reuse the information contained in the densely connected layers of the original model but we'll choose not toin order to cover the more general case where the class set of the new problem doesn' overlap the class set of the original model let' put this in practice by using the convolutional base of the vgg networktrained on imagenetto extract interesting features from cat and dog imagesand then train dogs-versus-cats classifier on top of these features the vgg modelamong otherscomes prepackaged with keras you can import it from the keras applications module here' the list of image-classification models (all pretrained on the imagenet datasetthat are available as part of keras applicationsxception inception resnet vgg vgg mobilenet let' instantiate the vgg model listing inst ant iat ing he vgg convolutional base from keras applications import vgg conv_base vgg (weights='imagenet'include_top=falseinput_shape=( )you pass three arguments to the constructorweights specifies the weight checkpoint from which to initialize the model include_top refers to including (or notthe densely connected classifier on top of the network by defaultthis densely connected classifier corresponds to the , classes from imagenet because you intend to use your own densely connected classifier (with only two classescat and dog)you don' need to include it input_shape is the shape of the image tensors that you'll feed to the network this argument is purely optionalif you don' pass itthe network will be able to process inputs of any size here' the detail of the architecture of the vgg convolutional base it' similar to the simple convnets you're already familiar withconv_base summary(layer (typeoutput shape param ===============================================================input_ (inputlayer(none licensed to