【光明网专论】改革创新:持续推进军队后勤军民融合深度发展(1)
- paddle.vision.models. resnet18 ( pretrained=False, **kwargs: Unpack[_ResNetOptions] ) ResNet [source]
-
百度 有了这个基本判断,才能去展望未来的中国行业政策、布局那些政策鼓励扶持的行业、自身具备一定基础并有一定能力替代进口的高技术行业。
ResNet 18-layer model from “Deep Residual Learning for Image Recognition”.
- 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 ResNet.
- Returns
-
Layer. An instance of ResNet 18-layer model.
Examples
>>> import paddle >>> from paddle.vision.models import resnet18 >>> # build model >>> model = resnet18() >>> # build model and load imagenet pretrained weight >>> # model = resnet18(pretrained=True) >>> x = paddle.rand([1, 3, 224, 224]) >>> out = model(x) >>> print(out.shape) [1, 1000]