gpt4 book ai didi

machine-learning - 右填充与左填充词向量?

转载 作者:行者123 更新时间:2023-12-04 16:06:30 25 4
gpt4 key购买 nike

在 RNN 世界中,填充词向量的哪一端以使其具有相同的长度是否重要?

例子

pad_left = [0, 0, 0, 0, 5, 4, 3, 2] 
pad_right = [5, 4, 3, 2, 0, 0, 0, 0]

最佳答案

有人在他们的论文中对pre-padding和post-padding做了实验Effects of Padding on LSTMs and CNNs .这是他们的结论。

For LSTMs, the accuracy of post-padding (50.117%) is way less than pre-padding (80.321%).

Pre-padding and post padding doesn’t matter much to CNN because unlike LSTMs, CNNs don’t try to remember stuff from the previous output, but instead tries to find pattern in the given data.

没想到padding位置的效果这么大,建议大家自己验证一下。

关于machine-learning - 右填充与左填充词向量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48533886/

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