Running Pytorch LSTM in browser

I am trying to run my trained LSTM network in the browser. I attempted to use ONNX and ONNX.js, but while ONNX supports LSTM (I was able to successfully save my trained LSTM network as a .onnx file), it seems that LSTM is not supported by ONNX.js. Let me know if I have this wrong.

Then, what is the best way to run my LSTM network in the browser? Any ideas would be appreciated.

The reason I want to run in browser is to allow simple interactions with the network on my github pages website. So if there is an easy alternative way to display a Pytorch network on the web that could solve this problem as well. Thanks!

It’s not exactly what you are looking for perhaps, but I recently started to use StreamLit and I think it’s amazingly simple and useful for making any python program into a browser interaction interface and supports native plotly, matplotlib, pandas… so it fits perfectly with Pytorch sort of data types: Streamlit — The fastest way to create data apps

1 Like

Thanks, this is a great alternative.