标签: deep-learning keras lstm rnn
我已经使用Keras定义了GRU,如何获取GRU的initial_state(h_0)?任何帮助将不胜感激!
答案 0 :(得分:1)
图层中有一个州名单
gru_layer_number = 2 # order of definition model.layers[gru_layer_number].states
您可以使用initial_state参数定义初始状态documentation says。
initial_state
您还可以检查get_initial_state()功能(尚未测试)
get_initial_state()