How Do Frameworks Like PyTorch and TensorFlow Handle Unrolled LSTM Layers from ONNX · Issue #6864 · onnx/onnx · GitHub
More Web Proxy on the site http://driver.im/
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
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:
Do these frameworks load the layers in their unrolled form, keeping them as separate operations?
Or do they use a pattern-matching engine to detect LSTM blocks in the ONNX graph?
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?
The text was updated successfully, but these errors were encountered:
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
, andConcat
layers. When converting an ONNX model to PyTorch, I have the following questions:Do these frameworks load the layers in their unrolled form, keeping them as separate operations?
Or do they use a pattern-matching engine to detect LSTM blocks in the ONNX graph?
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?
The text was updated successfully, but these errors were encountered: