From 4aa331d5486e6d06d3858ec3e19fc961727ca9c3 Mon Sep 17 00:00:00 2001 From: Somshubra Majumdar Date: Mon, 27 Feb 2017 22:25:30 -0600 Subject: [PATCH] Fix a few mistakes --- keras_contrib/applications/densenet.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/keras_contrib/applications/densenet.py b/keras_contrib/applications/densenet.py index a3eea7b..f1f3ad2 100644 --- a/keras_contrib/applications/densenet.py +++ b/keras_contrib/applications/densenet.py @@ -172,7 +172,7 @@ def DenseNet(depth=40, nb_dense_block=3, growth_rate=12, nb_filter=16, nb_layers def DenseNetFCN(input_shape, nb_dense_block=5, growth_rate=16, nb_layers_per_block=4, - bottleneck=False, reduction=0.0, dropout_rate=0.0, weight_decay=1E-4, init_conv_filters=48, + reduction=0.0, dropout_rate=0.0, weight_decay=1E-4, init_conv_filters=48, include_top=True, weights=None, input_tensor=None, classes=1, upsampling_conv=128, upsampling_type='upsampling', batchsize=None): """Instantiate the DenseNet FCN architecture. @@ -279,13 +279,6 @@ def DenseNetFCN(input_shape, nb_dense_block=5, growth_rate=16, nb_layers_per_blo # Create model. model = Model(inputs, x, name='fcn-densenet') - conv_count = 0 - for layer in model.layers: - if 'Convolution' in layer.__class__.__name__: - conv_count += 1 - - print("Number of convolutions : ", conv_count) - return model @@ -412,7 +405,7 @@ def __transition_up_block(ip, nb_filters, type='upsampling', output_shape=None, elif type == 'subpixel': x = Convolution2D(nb_filters, 3, 3, activation="relu", border_mode='same', W_regularizer=l2(weight_decay), bias=False, init='he_uniform')(ip) - x = SubPixelUpscaling(r=2, channels=int(nb_filters // 4))(x) + x = SubPixelUpscaling(r=2)(x) x = Convolution2D(nb_filters, 3, 3, activation="relu", border_mode='same', W_regularizer=l2(weight_decay), bias=False, init='he_uniform')(x) elif type == 'atrous':