所以我正在实施LSTM并且我有一些疑问,在LSTM论文和其他理论中我读到LSTM需要4个输入所以这里是LSTM电路的一个玩具示例,它采用一个简单的数组[1,0,1]现在这个数组传递到每个4输入门像这样:
enter image description here

现在没有问题我得到理论部分,问题是当我尝试在张量流中实现LSTM然后它以这种格式[[[x,x,x,x]]]输入并给出输出[[x,x] ]现在我在编码和理论部分之间混淆,我想了解tensorflow如何接受输入以及这种格式将如何输入LSTM电路,它的处理方式如何?
enter image description here

我也发现这个解释非常有用,但这也是理论上的术语,我想理解LSTM的张量流的输入格式含义是[[[x,x,x,x]]]什么是输出格式含义

所以这里是tensorflow中的玩具示例

with tf.variable_scope('one_cell') as scope:
    # One cell RNN input_dim (4) -> output_dim (2)
    hidden_size = 2
    cell = tf.contrib.rnn.BasicRNNCell(num_units=hidden_size)
    print(cell.output_size, cell.state_size)

    x_data = np.array([[h]], dtype=np.float32) # x_data = [[[1,0,0,0]]]
    pp.pprint(x_data)
    outputs, _states = tf.nn.dynamic_rnn(cell, x_data, dtype=tf.float32)

    sess.run(tf.global_variables_initializer())
    pp.pprint(outputs.eval())

产量

2 2
array([[[ 1.,  0.,  0.,  0.]]], dtype=float32)
array([[[ 0.28406101,  0.53163123]]], dtype=float32)

现在是什么是张量流lstm用_2546194做什么,结果代表什么, [[[ 0.28406101, 0.53163123]]] 是什么意思?它代表什么?它的预测还是什么?