mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Fix cell/hidden init issue, add copy states to test
Summary: As title. Wonder this had not been encountered before. Only affects cases where the states are copied over though. Reviewed By: Yangqing Differential Revision: D5777314 fbshipit-source-id: 8aef435c832e4ead5bb3d3e35bb065c734a2af5f
This commit is contained in:
committed by
Facebook Github Bot
parent
d4336edb05
commit
ceb13bf3fb
@ -1396,7 +1396,7 @@ def cudnn_LSTM(model, input_blob, initial_states, dim_in, dim_out,
|
||||
(hidden_input_blob, cell_input_blob) = initial_states
|
||||
output, hidden_output, cell_output, rnn_scratch, dropout_states = \
|
||||
model.net.Recurrent(
|
||||
[input_blob, cell_input_blob, cell_input_blob, weights],
|
||||
[input_blob, hidden_input_blob, cell_input_blob, weights],
|
||||
["lstm_output", "lstm_hidden_output", "lstm_cell_output",
|
||||
"lstm_rnn_scratch", "lstm_dropout_states"],
|
||||
seed=random.randint(0, 100000), # TODO: dropout seed
|
||||
|
Reference in New Issue
Block a user