Tensorflow 如何使用tflearn在输入和输出上使用完全连接的神经网络实现lstm?

Tensorflow 如何使用tflearn在输入和输出上使用完全连接的神经网络实现lstm?,tensorflow,lstm,tflearn,Tensorflow,Lstm,Tflearn,我需要实现一个lstm,其中输入和输出都通过完全连接的神经网络传递?现在,我正在努力实现这一目标。我需要知道这是否有效,是否可以更有效地实施 inputs = tflearn.input_data(shape=[None, seq_len, ip_dim]) ## (samples, timesteps, ip_dim) net = tflearn.reshape (inputs, new_shape = [-1, ip_dim]) net = tflearn.fully

我需要实现一个lstm,其中输入和输出都通过完全连接的神经网络传递?现在,我正在努力实现这一目标。我需要知道这是否有效,是否可以更有效地实施

    inputs = tflearn.input_data(shape=[None, seq_len, ip_dim]) ## (samples, timesteps, ip_dim)
    net = tflearn.reshape (inputs, new_shape = [-1, ip_dim])
    net = tflearn.fully_connected(net, 300, weights_init = tflearn.initializations.xavier())
    net = tflearn.reshape (net, new_shape = (-1, seq_len, 300))

    net = tflearn.gru(net, 400, activation='relu',return_seq = True, dynamic = False, weights_init = tflearn.initializations.xavier())
    net = tf.concat(net, axis = 0)

    net = tflearn.fully_connected(net, self.a_dim, weights_init = tflearn.initializations.xavier())