8000 How Do Frameworks Like PyTorch and TensorFlow Handle Unrolled LSTM Layers from ONNX · Issue #6864 · onnx/onnx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

How Do Frameworks Like PyTorch and TensorFlow Handle Unrolled LSTM Layers from ONNX #6864

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

Open
kumarutkarsh1248 opened this issue Apr 2, 2025 · 0 comments
Labels
question Questions about ONNX

Comments

@kumarutkarsh1248
Copy link
kumarutkarsh1248 commented Apr 2, 2025

Image
This above image represents an LSTM block in ONNX

I'm trying to understand how frameworks such as PyTorch and TensorFlow load layers that are stored in an unrolled state in ONNX.

For example, in ONNX, LSTM and RNN models are often represented in an unrolled form, consisting of multiple Linear, Add, and Concat layers. When converting an ONNX model to PyTorch, I have the following questions:

  1. Do these frameworks load the layers in their unrolled form, keeping them as separate operations?

  2. Or do they use a pattern-matching engine to detect LSTM blocks in the ONNX graph?

  3. If such an engine exists, does PyTorch then replace the unrolled structure with a native torch.nn.LSTM layer instead of preserving the individual operations?

@kumarutkarsh1248 kumarutkarsh1248 added the question Questions about ONNX label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about ONNX
Projects
None yet
Development

No branches or pull requests

1 participant
0