print(network.shape ) # ( ? , 256, 2, 128 )
network = reshape(network,[-1,256,256])
print(network.shape) # ( ? , 256, 256 ) batch_Size,time_stamp,features
network = bidirectional_rnn(network, GRUCell(32 ), GRUCell(32) )
Я пытаюсь закодировать CRNN, используя tflearn, вот журнал, который я получаю:
File "data_clean.py", line 117, in sai_net
network = bidirectional_rnn(network, GRUCell(32 ), GRUCell(32) )
File "/usr/local/lib/python2.7/dist-packages/tflearn/layers/recurrent.py", line 374, in bidirectional_rnn
dtype=tf.float32)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/rnn.py", line 405, in bidirectional_dynamic_rnn
time_major=time_major, scope=fw_scope)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/rnn.py", line 598, in dynamic_rnn
dtype=dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/rnn.py", line 661, in _dynamic_rnn_loop
for input_ in flat_input)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/rnn.py", line 661, in <genexpr>
for input_ in flat_input)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 654, in with_rank_at_least
raise ValueError("Shape %s must have rank at least %d" % (self, rank))
ValueError: Shape (256, ?) must have rank at least 3
я что-то упустил, так как тензор имеет три измерения, первым будет партияразмер, который я буду кормить в сети.Подобный код отлично работает на керасе.я что-то здесь упускаю?