def VGG16ConvBlockFive( pretrained_weights ):
input_vector = Input( shape = ( 14, 14, 512 ) )
x = Conv2D(512, (3, 3), activation='relu', padding='same', name='block5_conv1')( input_vector )
x = Conv2D(512, (3, 3), activation='relu', padding='same', name='block5_conv2')(x)
x = Conv2D(512, (3, 3), activation='relu', padding='same', name='block5_conv3')(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name='block5_pool')(x)
model = Model( input_vector, x )
if pretrained_weights :
print "finetuned conv_block_5 weights loading"
model.load_weights( 'FCC-init-random-weights-on-finetuned-data.h5', by_name = True )
return model
评论列表
文章目录