Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot take values from initializers for initial states of RNN/GRU/LSTM ops #1838

Closed
liqunfu opened this issue Feb 28, 2019 · 2 comments
Closed
Labels
operator Issues related to ONNX operators stale

Comments

@liqunfu
Copy link
Collaborator

liqunfu commented Feb 28, 2019

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.

@srikanthderebail
Copy link

Hello,

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 ??

@prasanthpul prasanthpul added the operator Issues related to ONNX operators label Jul 15, 2019
@stale
Copy link

stale bot commented Mar 28, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Mar 28, 2022
@stale stale bot closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operator Issues related to ONNX operators stale
Projects
None yet
Development

No branches or pull requests

3 participants