0

我试图在 Tf-learn 中创建一个多层 LSTM,但没有成功。

这样做时

a = tflearn.lstm(_input, dropout=0.8, n_units=200, return_seq=True, dynamic=True)
b = tflearn.lstm(a, dropout=0.8, n_units=200, return_seq=False, dynamic=True)

我将得到一个列表作为输出a和训练时的错误:

  /usr/local/lib/python2.7/distpackages/tensorflow/python/ops/gradients.py:90: UserWarning: 
 Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
 "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "

在 Tf-learn 中做多层 LSTM 的正确方法是什么?

4

1 回答 1

0

你解决了吗?如果没有,试试这个:

a = tflearn.lstm(_input, 200)
b = tflearn.dropout(a, 0.8)
c = tflearn.lstm(b, 200)
d = tflearn.dropout(c, 0.8)
于 2017-02-01T13:16:26.020 回答