Skip to content

DenseNet 201 and 264 seem to be identical #3055

@codingS3b

Description

@codingS3b

I was wondering if it is intended that the DenseNet201 and DenseNet264 models are implemented (see here) using the same parameters? Both have init_features: int = 64, growth_rate: int = 32 and block_config: Sequence[int] = (6, 12, 48, 32) giving them exactly the same number of parameters. I'm not that familiar with the architectures but assumed that the different model variants would differ in size.

I tried the following code:

from monai.networks.nets import DenseNet264, DenseNet201

def count_params(model):
    return sum([p.numel() for p in model.parameters() if p.requires_grad])

print(count_params(DenseNet201(spatial_dims=2, in_channels=3, out_channels=1)))  # 18094849
print(count_params(DenseNet264(spatial_dims=2, in_channels=3, out_channels=1)))  # 18094849

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions