<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Deep CNN Models
Constructing and training your own ConvNet from scratch can be Hard and a long task.
A common trick used in Deep Learning is to use a pre-trained model and finetune it to the specific data it will be used for. 
Famous Models with Keras
This notebook contains code and reference for the following Keras models (gathered from https
Step1:  If you're wondering where this HDF5 files with weights is stored, please take a look at ~/.keras/models/
HandsOn VGG16 - Pre-trained Weights
Step2:  <img src="imgs/imagenet/strawberry_1157.jpeg" >
Step3:  <img src="imgs/imagenet/apricot_696.jpeg" >
Step4:  <img src="imgs/imagenet/apricot_565.jpeg" >
Step5:  Hands On
Step6:  Residual Networks
<img src="imgs/resnet_bb.png" >
ResNet 50
<img src="imgs/resnet34.png" >
<ASSISTANT_TASK:>
Python Code:
from keras.applications import VGG16
from keras.applications.imagenet_utils import preprocess_input, decode_predictions
import os
# -- Jupyter/IPython way to see documentation
# please focus on parameters (e.g. include top)
VGG16??
vgg16 = VGG16(include_top=True, weights='imagenet')
Explanation: Deep CNN Models
Constructing and training your own ConvNet from scratch can be Hard and a long task.
A common trick used in Deep Learning is to use a pre-trained model and finetune it to the specific data it will be used for. 
Famous Models with Keras
This notebook contains code and reference for the following Keras models (gathered from https://github.com/fchollet/keras/tree/master/keras/applications)
VGG16
VGG19
ResNet50
Inception v3
Xception
... more to come
References
Very Deep Convolutional Networks for Large-Scale Image Recognition - please cite this paper if you use the VGG models in your work.
Deep Residual Learning for Image Recognition - please cite this paper if you use the ResNet model in your work.
Rethinking the Inception Architecture for Computer Vision - please cite this paper if you use the Inception v3 model in your work.
All architectures are compatible with both TensorFlow and Theano, and upon instantiation the models will be built according to the image dimension ordering set in your Keras configuration file at ~/.keras/keras.json. 
For instance, if you have set image_data_format="channels_last", then any model loaded from this repository will get built according to the TensorFlow dimension ordering convention, "Width-Height-Depth".
VGG16
<img src="imgs/vgg16.png" >
VGG19
<img src="imgs/vgg19.png" >
keras.applications
End of explanation
IMAGENET_FOLDER = 'imgs/imagenet'  #in the repo
!ls imgs/imagenet
Explanation: If you're wondering where this HDF5 files with weights is stored, please take a look at ~/.keras/models/
HandsOn VGG16 - Pre-trained Weights
End of explanation
from keras.preprocessing import image
import numpy as np
img_path = os.path.join(IMAGENET_FOLDER, 'strawberry_1157.jpeg')
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
print('Input image shape:', x.shape)
preds = vgg16.predict(x)
print('Predicted:', decode_predictions(preds))
Explanation: <img src="imgs/imagenet/strawberry_1157.jpeg" >
End of explanation
img_path = os.path.join(IMAGENET_FOLDER, 'apricot_696.jpeg')
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
print('Input image shape:', x.shape)
preds = vgg16.predict(x)
print('Predicted:', decode_predictions(preds))
Explanation: <img src="imgs/imagenet/apricot_696.jpeg" >
End of explanation
img_path = os.path.join(IMAGENET_FOLDER, 'apricot_565.jpeg')
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
print('Input image shape:', x.shape)
preds = vgg16.predict(x)
print('Predicted:', decode_predictions(preds))
Explanation: <img src="imgs/imagenet/apricot_565.jpeg" >
End of explanation
# from keras.applications import VGG19
Explanation: Hands On:
Try to do the same with VGG19 Model
End of explanation
## from keras.applications import ...
Explanation: Residual Networks
<img src="imgs/resnet_bb.png" >
ResNet 50
<img src="imgs/resnet34.png" >
End of explanation
<END_TASK>