You sure can. It’s just that if you have any overlapping functionality (eg if you want to continue to train in users’ browsers) then you have to rewrite the code you already have for JS. For a lot of other applications that’s enough of a downside to make writing all your code in JS worthwhile.
Will Clark
I don’t find it to be a horrible experience.
I’m very open to hearing about setups that work. When I had a look there didn’t seem to be a canonical way to do it and the one or two things I tried didn’t go well.
I just don’t think many people doing deep learning stuff are doing any sort of type checking anyway.
This is definitely my impression, but it seems weird to me. As a newbie to deep learning I’m constantly unsure what rank my tensors are and working with TS has meant I don’t have to constantly break my chain of thought to read code and work it out.
there’s just no push to move to JS
Yeah, this is basically what I’m confused about. In other areas I see a million JS fans piling in proclaiming the benefits even when it makes no sense, but that just doesn’t seem to happen with ML. Maybe the answer’s just that I haven’t got the right Python setup.
You can with Node.js, e.g. https://nodejs.org/dist/latest-v12.x/docs/api/n-api.html
TensorFlow.js for Node.js is just a nice way to interface with a native backend, just like the Python library. In the browser they use WASM rather than pure JS for better performance. But you’re right that it’s not quite as easy as Python.
[Question] Why isn’t JS a popular language for deep learning?
I’d argue that “personhood” is rarely what these things actually care about
This is probably true. Maybe the best use case is actually the opposite of preventing bots: enabling good bots who can’t pass CAPTCHAs to access services they need (by paying humans to let them in).
Yeah, I only really mention spam because it’s the one obvious use case I could think of and people are already familiar with it. It seems like spam is mostly solved anyway in many domains, so if that’s the only thing this proposal can solve it’s not much use.
It will depend on the use case whether it’s practical, but Tensorflow.js with WASM definitely makes it viable for some situations.