在Tensorflow中混合前馈层和复发层?

Fio*_*ino 8 python tensorflow recurrent-neural-network gated-recurrent-unit

有没有人能够在Tensorflow中混合前馈层和重复层?

例如:input-> conv-> GRU-> linear-> output

我可以想象一个人可以用前馈层定义他自己的单元格而没有可以使用MultiRNNCell函数堆叠的状态,如:

cell = tf.nn.rnn_cell.MultiRNNCell([conv_cell,GRU_cell,linear_cell])

这会让生活变得更轻松......

小智 1

你不能只执行以下操作:

rnnouts, _ = rnn(grucell, inputs)
linearout = [tf.matmul(rnnout, weights) + bias for rnnout in rnnouts]
Run Code Online (Sandbox Code Playgroud)

ETC。