LSTMBlockFusedCell不支持使用outputprojectionwrapper

时间:2019-04-10 09:30:49

标签: python performance tensorflow tensorflow-serving

我正在尝试将LSTMCell替换为LSTMBlockFusedCell,以获得更好的性能,但是我发现LSTMBlockFusedCell没有输出的项目操作,因此我添加了{从

outputprojectionwrapper的{​​1}}
LSTMBlockFusedCell

但是我遇到了错误

cell = tf.contrib.rnn.OutputProjectionWrapper( 
    tf.contrib.rnn.LSTMBlockFusedCell(config.hidden_size,
                                      forget_bias=0.0,
                                      cell_clip=config.cell_clip,     
                                      use_peephole=config.use_peephole),
                                      output_size=n_outputs)

如何在TypeError: The argument 'cell' (<tensorflow.contrib.rnn.python.ops.lstm_ops.LSTMBlockFusedCell object at 0x7f2c08f1eb90>) is not an RNNCell: 'output_size' property is missing, 'state_size' property is missing, 'zero_state' method is missing. 中添加投影?

0 个答案:

没有答案