Is there a PyTorch equivalent of TensorFlow.js?

Hello,

I’m wondering if there’s an equivalent of TensorFlow.js in PyTorch?

TensorFlow.js works right in the browser and I’d like to do something similar with a PyTorch model (if possible).

Has anyone done this?

Or is using an API for deployment too easy these days?

Running directly in the browser has a fair few benefits.

Thank you

1 Like

There doesn’t seem overwhelming community demand for it but if you think I’m wrong please let me know!

An alternative may be https://github.com/microsoft/onnxjs but the repo is read only so idk if this the best option long term

1 Like

You can do PyTorch → ONNXONNX Runtime Web.

ONNX Runtime Web is under active development.

2 Likes

FYI, ONNX.js has been replaced by ONNX Runtime Web which offers enhanced user experience and improved performance.

2 Likes

One way would be to go Pytorch → Keras directly using Nobuco, then convert to TFLite/TFJS as normal.