carlthome/tensorflow-convlstm-cell

Error when used for decoding

quanlzheng opened this issue · 3 comments

TypeError: 'Tensor' object is not iterable.

I use tensorflow v1.2
It seems that state cannot be a tuple. But I don't know how to modify? Can you give some suggestions?

State can be a nested structure of tuples. Looks like you have a straight up type error in your code. Try seeing what your cell definition's state actually looks like:

state = cell.zero_state(1, tf.float32)
print(state)

Thanks a lot. It seems that existing another problem. I use "tf.contrib.seq2seq.dynamic_decode" for ConvLSTM decoding, here is the error:
ValueError: Inconsistent shapes: saw (4, 640, 480) but expected (4,) (and infer_shape=True)

Can I directly use the "tf.contrib.seq2seq.dynamic_decode" for ConvLSTM decoding?

The official support channel for TensorFlow users is on Stack Overflow, I believe.