0
我试图执行下面的代码段:动态双向RNN类型错误
# GRU Network
# Forward cell
cell_fw = tf.contrib.rnn.GRUCell(num_units=n_hidden, activation='tanh')
# Backward cell
cell_bw = tf.contrib.rnn.GRUCell(num_units=n_hidden, activation='tanh')
GRUOutput, _, _ = tf.contrib.rnn.stack_bidirectional_dynamic_rnn([cell_fw], [cell_bw], inputs, dtype=tf.float32) # <-- Error Here!
我得到这个错误:
TypeError: 'str' object is not callable
输入具有大小[32,200,50],和n_hidden = 50.
有人能告诉我我哪里出错了吗?非常感谢你!
谢谢!这工作!我使用了文档中给出的示例,默认激活是'tanh'。 – AnnaR