未验证 提交 77e387ae 编写于 作者: M Mu Li 提交者: GitHub

use globalavgpool2d

上级 c3fd69ae
......@@ -63,8 +63,10 @@ with net.name_scope():
mlpconv(10, 3, 1, max_pooling=False),
# 输入为 batch_size x 10 x 5 x 5, 通过AvgPool2D转成
# batch_size x 10 x 1 x 1。
nn.AvgPool2D(pool_size=5),
# 转成 batch_size x 10
       # 我们可以使用 nn.AvgPool2D(pool_size=5),
# 但更方便是使用全局池化,可以避免估算pool_size大小
nn.GlobalAvgPool2D(),
       # 转成 batch_size x 10
nn.Flatten()
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册