【发布时间】:2018-01-28 05:32:19
【问题描述】:
我的问题是关于元素动态或静态 rnn 输出的维度。
nlu_input = tf.placeholder(tf.float32, shape=[4,1607,1])
cell = tf.nn.rnn_cell.BasicLSTMCell(80)
outts, states = tf.nn.dynamic_rnn(cell=cell, inputs=nlu_input, dtype=tf.float32)
然后 tf.gloabal_valiables() 返回以下列表。
[<tf.Variable 'rnn/basic_lstm_cell/kernel:0' shape=(81, 320) dtype=float32_ref>,<tf.Variable 'rnn/basic_lstm_cell/bias:0' shape=(320,) dtype=float32_ref>]
我期望 tf.Variable 'rnn/basic_lstm_cell/kernel:0' shape=(80, 320),因为 320 = 4*80 并且单元数是 80。
为什么内核的维数会增加?
【问题讨论】:
标签: python tensorflow neural-network lstm rnn