Skip to content

Commit

Permalink
labeled all convolutional layers
Browse files Browse the repository at this point in the history
  • Loading branch information
awentzonline committed Mar 14, 2016
1 parent 2c3d6f3 commit 489f2e6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions image_analogy/vgg16.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,37 @@ 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)))
model.add(Convolution2D(512, 3, 3, activation='relu', name='conv4_1'))
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
Expand Down

0 comments on commit 489f2e6

Please sign in to comment.