Having spent a little time in the Python and ML/DL space I think you’re really hitting on an important pain point for web developers. Everything about the field from the academic research to industry adoption to the open source libraries has completely transformed since AlexNet in 2012, GPT-3 being a perfect recent example. But this progress hasn’t trickled down to best practices that can be simply integrated into our existing web applications.
And I don’t think this is really a technical problem at all, the problem is having all the data people in one language using notebooks and all the web people in another language using servers and browsers. So you have this huge technical moat between the two environments and really what we should do is start over entirely and have both camps just write this stuff in Rust but that’s never going to happen.
There’s a bunch of other libraries to choose from and since this is a really straight forward regression most of them would be total overkill but I’m curious nonetheless if you looked at any of the more deep learning focused libraries like Tensorflow.js, Brain.js, Convnetjs.