1

大家好,我有一个问题,我正在使用 python 3.6.5 和 tensorflow 1.8.0。我的输入是 1000 max_textlength * 64 嵌入 * 4 个步骤和 3 个协议 = 64007 神经数 = 10

一个普通的 RNN 可以工作,但我想改进它

attentioncellwrapper(neurons, 2, state_is_tuple = True)

我收到以下消息:

   Value Error: Dimension 1 in both shapes must be equal, but are 10 and
    20. Shapes are [?, 10) and [?, 20]. 
        From merging shape 1 with another shape for 'fully_connected/packed'(op: Pack) with input shapes [?,10], [?,10], [?,20]

为什么会这样?有没有人也有这个问题?

我也在试验 state_is_tuple = False,没有给出错误信息,但是 python 突然崩溃了 :(

顺便说一句,当我将注意力长度从 2 更改为 3 或 4 时,这更改为

 Value Error: Dimension 1 in both shapes must be equal, but are 10 and
30. Shapes are [?, 10) and [?, 30]. 
 Value Error: Dimension 1 in both shapes must be equal, but are 10 and
40. Shapes are [?, 10) and [?, 40]. 

似乎注意力长度与形状相乘非常感谢您的帮助!

4

0 回答 0