Tentei o DRQN para observações parciais, mas recebi o erro:
ValueError: o tensor de prefixo deve ser escalar ou vetorial, mas viu tensor: Tensor ("Placeholder_2: 0", dtype = int32)
self.state_in = rnn_cell.zero_state (self.batch_size, tf.float32)
Descobri que existem 3 linhas consecutivas:
self.batch_size = tf.placeholder (dtype = tf.int32)
self.convFlat = tf.reshape (slim.flatten (self.conv4), [self.batch_size, self.trainLength, h_size])
self.state_in = rnn_cell.zero_state (self.batch_size, tf.float32)
Eu mudo a linha:
self.batch_size = tf.placeholder (dtype = tf.int32)
em:
self.batch_size = tf.placeholder (dtype = tf.int32, forma = [])
E funciona.
Obrigado!!!! Eu tinha certeza de que o código estava condenado, por https://github.com/tensorflow/tensorflow/issues/10213
Mas essa correção está correta e funcionou para mim também!
Realmente espero que @awjuliani consiga consertar o código (modificar literalmente uma linha), obrigado senhor!
Acabei de fazer a mudança! Obrigado por apontar isso.
Comentários muito úteis
Descobri que existem 3 linhas consecutivas:
self.batch_size = tf.placeholder (dtype = tf.int32)
self.convFlat = tf.reshape (slim.flatten (self.conv4), [self.batch_size, self.trainLength, h_size])
self.state_in = rnn_cell.zero_state (self.batch_size, tf.float32)
Eu mudo a linha:
self.batch_size = tf.placeholder (dtype = tf.int32)
em:
self.batch_size = tf.placeholder (dtype = tf.int32, forma = [])
E funciona.