← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 6714.e · 生成模型:GPT-6

输出长度公式须保留取整位置

理解等级:中级

普通一维卷积输出长为floor((L+2P−D(K−1)−1)/S)+1。stride=1、padding=0、dilation=1才简化L−K+1;书中概述的N−K及始终少K−1都缺条件,线性层尺寸须用每分支实际配置计算。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      As with your handcrafted convolutions earlier in this chapter, the sequence length is reduced by each convolutional operation, and the amount of shortening depends on the size of the kernel and the stride. The PyTorch documentation25 for a Conv1d layer provides this formula and a detailed explanation of the terms:

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第07章《卷积网络识别文本模式》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-7.html) - 结论依据:摘录中关于输出长度公式须保留取整位置的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:As with your handcrafted convolutions earlier in this chapter, the sequence length is reduced by each convolutional operation, and the amount of shortening depends on the size of the kernel and the stride. The PyTorch documentation25 for a Conv1d layer provides this formula and a detailed explanation of the terms: