Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is connection to 12 layers of each dense block? #51

Closed
thaingiW opened this issue Mar 21, 2019 · 1 comment
Closed

Where is connection to 12 layers of each dense block? #51

thaingiW opened this issue Mar 21, 2019 · 1 comment

Comments

@thaingiW
Copy link

In Densenet which has 12 layers,the second layers has 11 connections.I cannot find it.Please explain.Thanks.

@thaingiW
Copy link
Author

def __dense_block(x, nb_layers, nb_filter, growth_rate, bottleneck=False, dropout_rate=None, weight_decay=1e-4,
grow_nb_filters=True, return_concat_list=False):
concat_axis = 1 if K.image_data_format() == 'channels_first' else -1

x_list = [x]

for i in range(nb_layers):
    cb = __conv_block(x, growth_rate, bottleneck, dropout_rate, weight_decay)
    x_list.append(cb)

    x = concatenate([x, cb], axis=concat_axis)

    if grow_nb_filters:
        nb_filter += growth_rate

if return_concat_list:
    return x, nb_filter, x_list
else:

return x, nb_filter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant