Re:Deep Learning in JavaScript
by richrichie on Thursday March 28, 2024 @10:23PM
(#39859944)
With PyTorch dominating the landscape, my guess was that tf will resurrect itself through tfjs. Seems may not.
Re:Deep Learning in JavaScript
by eduardoleao052 on Friday March 29, 2024 @02:08AM
(#39861144)
Adding GPU support soon is absolutely my goal in the future!
I think a PyTorch-based JavaScript library could be useful, as PyTorch has been way more dominant than TensorFlow recently.
tfjs is dead, looking at the commit history. The standard now is to convert PyTorch to onnx, then use onnxruntime (https://github.com/microsoft/onnxruntime/tree/main/js/web) to run the model on the browser using webassembly/webGL (and nodejs if you wanted to, but why?).
> nodejs if you wanted to, but why?
Node.js is better backend than something like Flask.
Performance is a lot worse on NodeJS with a WebAssembly/WebGL backend versus Flask with a PyTorch/CUDA backend.
Re:Deep Learning in JavaScript
by throwaway4aday on Friday March 29, 2024 @11:04AM
(#39864934)
If you're using Node you can write whatever you want in C++ and then add a binding to call it from within your Node app. Don't need WebGL.
Yeah, but why...?
But you're having to write whatever in C++ versus just using Flask/Pytorch.
Re:Deep Learning in JavaScript
by throwaway4aday on Friday March 29, 2024 @09:01PM
(#39870810)
A lot of what you need is already written, you just need to find the right libraries and write the bindings. From my encounters with Python ML it seems like "just use Pytorch" is a bit like "simply walk into Mordor".
https://github.com/tensorflow/tfjs
I'd love to see PyTorch in JS, but I think unless you get it running on the GPU it won't be able to do much.