tensorflow static_rnn error: input must be a sequence

吃可爱长大的小学妹 提交于 2019-12-04 12:16:36

When you call pred = RNN(data, weights, biases), the data argument should be a sequence of length the length of your RNN. But in your case, it's a data = tf.placeholder(tf.bool, name='data').

You could try pred = RNN([data], weights, biases).

See the string doc of the method:

inputs: A length T list of inputs, each a Tensor of shape [batch_size, input_size], or a nested tuple of such elements.

If the length of your RNN is unknow, you should consider use tf.nn.dynamic_rnn.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!