什么是将变长序列输入到循环神经网络(RNN)中的完整工作示例(不是片段)?
例如,PyTorch可以将变长序列作为输入实现到RNN中,但似乎没有完整工作代码的示例。
Relevant: https://github.com/pytorch/pytorch/releases/tag/v0.1.10 https://discuss.pytorch.org/t/about-the-variable-length-input-in-rnn-scenario/345
什么是将变长序列输入到循环神经网络(RNN)中的完整工作示例(不是片段)?
例如,PyTorch可以将变长序列作为输入实现到RNN中,但似乎没有完整工作代码的示例。
Relevant: https://github.com/pytorch/pytorch/releases/tag/v0.1.10 https://discuss.pytorch.org/t/about-the-variable-length-input-in-rnn-scenario/345
a b c d e
a b c d e f g h
a b c d
a b
as
a b c d e 0 0 0
a b c d e f g h
a b c d 0 0 0 0
a b 0 0 0 0 0 0
0
。这是有道理的,因为无论权重如何,0
都不会对网络的隐藏层产生任何影响,因为anything*0=0
。
等长输入序列的大小可变
是什么意思? "cat is big","dog is small" - 这两个序列具有相等长度的输入(3个单词)。这里的序列大小再次指的是什么? - theprogrammer