gpt4 book ai didi

pytorch - 如何计算配置文件中卷积层后的输出大小?

转载 作者:行者123 更新时间:2023-12-05 08:40:18 27 4
gpt4 key购买 nike

我是卷积神经网络的新手,想知道如何在给定 pytorch 配置文件的情况下计算或计算模型层之间的输出大小,类似于 this link 中的说明。 .

我已经看过的大部分内容都不是很清楚和简洁。我应该如何计算每一层的尺寸?下面是将被解析的配置文件的片段。

# (3, 640, 640)
[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

# (16, 320, 320)

最佳答案

简而言之,输出dims的计算有一个通用的公式:

formula

您可以在 A guide to receptive field arithmetic for Convolutional Neural Networks 中找到解释.

此外,我想推荐一篇很棒的文章A guide to convolution arithmetic for deep learning .

还有这个 repo conv_arithmetic带有卷积动画。

关于pytorch - 如何计算配置文件中卷积层后的输出大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56450969/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com