densenet201

paddle.vision.models. densenet201 ( pretrained=False, **kwargs ) [source]

DenseNet 201-layer model from “Densely Connected Convolutional Networks”.

Parameters
  • pretrained (bool, optional) – Whether to load pre-trained weights. If True, returns a model pre-trained on ImageNet. Default: False.

  • **kwargs (optional) – Additional keyword arguments. For details, please refer to DenseNet.

Returns

Layer. An instance of DenseNet 201-layer model.

Examples

>>> import paddle
>>> from paddle.vision.models import densenet201

>>> # Build model
>>> model = densenet201()

>>> # Build model and load imagenet pretrained weight
>>> # model = densenet201(pretrained=True)
>>> x = paddle.rand([1, 3, 224, 224])
>>> out = model(x)

>>> print(out.shape)
[1, 1000]