You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take GRU for example, its initial_h input is of shape [num_directions, batch_size, hidden_size]. This works if initial_h is computed. However, when initial state is a model parameter, it is from initializer with shape [num_directions, hidden_size] (without batch_size dimension). In this case, initial_h as an initializer cannot be fed into the GRU node.
Additionally, batch_size is likely symbolic in a real ONNX model. This need to be taken into consideration when solving the issue.
The text was updated successfully, but these errors were encountered:
I have a similar problem when trying to save a tensorflow model of RNN to onnx format. The model has two inputs, one is the initial state of size [num_directions, batch_size, hidden_size] and the other is actual input to the model of size [num_directions, batch_size, input_size].
I would like to know if giving initial states to RNN/LSTM/GRU is supported in onnx ??
Take GRU for example, its initial_h input is of shape [num_directions, batch_size, hidden_size]. This works if initial_h is computed. However, when initial state is a model parameter, it is from initializer with shape [num_directions, hidden_size] (without batch_size dimension). In this case, initial_h as an initializer cannot be fed into the GRU node.
Additionally, batch_size is likely symbolic in a real ONNX model. This need to be taken into consideration when solving the issue.
The text was updated successfully, but these errors were encountered: