From 489f2e699aa2707bf464c426969c8a3a81c137a1 Mon Sep 17 00:00:00 2001 From: Adam Wentz Date: Mon, 14 Mar 2016 14:58:19 -0500 Subject: [PATCH] labeled all convolutional layers --- image_analogy/vgg16.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/image_analogy/vgg16.py b/image_analogy/vgg16.py index 89f642c..ae754e3 100644 --- a/image_analogy/vgg16.py +++ b/image_analogy/vgg16.py @@ -38,21 +38,21 @@ def get_model(img_width, img_height, weights_path='vgg16_weights.h5', pool_mode= model.add(ZeroPadding2D((1, 1), input_shape=(3, img_height, img_width))) model.add(Convolution2D(64, 3, 3, activation='relu', name='conv1_1')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(64, 3, 3, activation='relu')) + model.add(Convolution2D(64, 3, 3, activation='relu', name='conv1_2')) model.add(pool_class((2, 2), strides=(2, 2))) model.add(ZeroPadding2D((1, 1))) model.add(Convolution2D(128, 3, 3, activation='relu', name='conv2_1')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(128, 3, 3, activation='relu')) + model.add(Convolution2D(128, 3, 3, activation='relu', name='conv2_2')) model.add(pool_class((2, 2), strides=(2, 2))) model.add(ZeroPadding2D((1, 1))) model.add(Convolution2D(256, 3, 3, activation='relu', name='conv3_1')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(256, 3, 3, activation='relu')) + model.add(Convolution2D(256, 3, 3, activation='relu', name='conv3_2')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(256, 3, 3, activation='relu')) + model.add(Convolution2D(256, 3, 3, activation='relu', name='conv3_3')) model.add(pool_class((2, 2), strides=(2, 2))) model.add(ZeroPadding2D((1, 1))) @@ -60,15 +60,15 @@ def get_model(img_width, img_height, weights_path='vgg16_weights.h5', pool_mode= model.add(ZeroPadding2D((1, 1))) model.add(Convolution2D(512, 3, 3, activation='relu', name='conv4_2')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(512, 3, 3, activation='relu')) + model.add(Convolution2D(512, 3, 3, activation='relu', name='conv4_3')) model.add(pool_class((2, 2), strides=(2, 2))) model.add(ZeroPadding2D((1, 1))) model.add(Convolution2D(512, 3, 3, activation='relu', name='conv5_1')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(512, 3, 3, activation='relu')) + model.add(Convolution2D(512, 3, 3, activation='relu', name='conv5_2')) model.add(ZeroPadding2D((1, 1))) - model.add(Convolution2D(512, 3, 3, activation='relu')) + model.add(Convolution2D(512, 3, 3, activation='relu', name='conv5_3')) model.add(pool_class((2, 2), strides=(2, 2))) # load the weights of the VGG16 networks