小编Dan*_*Fox的帖子

Tensor Flow - LSTM - 'Tensor'对象不可迭代

嗨我正在使用以下函数为lstm rnn单元格.

def LSTM_RNN(_X, _istate, _weights, _biases):
    # Function returns a tensorflow LSTM (RNN) artificial neural network from given parameters. 
    # Note, some code of this notebook is inspired from an slightly different 
    # RNN architecture used on another dataset: 
    # https://tensorhub.com/aymericdamien/tensorflow-rnn

    # (NOTE: This step could be greatly optimised by shaping the dataset once
    # input shape: (batch_size, n_steps, n_input)
    _X = tf.transpose(_X, [1, 0, 2])  # permute n_steps and batch_size

    # Reshape to prepare input to hidden activation …
Run Code Online (Sandbox Code Playgroud)

python neural-network lstm tensorflow

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

lstm ×1

neural-network ×1

python ×1

tensorflow ×1