Implementation – loading weights and inferencing with VGG-
sard/post/vgg16/ provides the weights as a dictionary of NumPy arrays. There are 16 weight values and 16 bias values corresponding to the 16 layers of VGG-16. They are saved under the keys as follows:
conv1_1_W, conv1_1_b, conv1_2_W, conv1_2_b, conv2_1_W, conv2_1_b…
First, download the file from the website and place it in the ch9/image_caption_data
folder. Now we will discuss the implementation, from loading the downloaded CNN to making predictions with the pretrained CNN we'll use. First, we will discuss how to create necessary TensorFlow variables and load them with the downloaded weights. Next, we will define an input reading pipeline to read in images as inputs to the CNN and also ...
Get Natural Language Processing with TensorFlow now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.