AlexNet

paddle.vision.models. AlexNet ( num_classes=1000 ) [源代码]

AlexNet 模型,来自论文 "ImageNet Classification with Deep Convolutional Neural Networks"

参数

  • num_classes (int,可选) - 最后一个全连接层输出的维度。如果该值小于等于 0,则不定义最后一个全连接层。默认值为 1000。

返回

Layer,AlexNet 模型实例。

代码示例

>>> import paddle
>>> from paddle.vision.models import AlexNet

>>> alexnet = AlexNet()
>>> x = paddle.rand([1, 3, 224, 224])
>>> out = alexnet(x)
>>> print(out.shape)
[1, 1000]