LeNet¶
- class paddle.vision.models. LeNet ( num_classes=10 ) [源代码] ¶
-
LeNet模型,来自论文 "Gradient-based learning applied to document recognition" 。
参数¶
num_classes (int,可选) - 最后一个全连接层输出的维度。默认值:10。
代码示例¶
import paddle
from paddle.vision.models import LeNet
model = LeNet()
x = paddle.rand([1, 1, 28, 28])
out = model(x)
print(out.shape)