I've tried using both tensorflow and pytorch via their C/C++ apis. It's possible, but just enough of the convenience logic is in python that it's not very practical.
Incidentally if you're going to do it, I recommend pytorch over tensorflow.
A case could be made to consider libraries systems programming, as the "system" is often more than just the kernel. If you have libraries doing the heavy lifting of all that, then the language on top that calls into those libraries for the bulk of the intensive work matters quite a bit less.
I don't think it's possible to choose a worse (mainstream) language for general purpose use than Javascript.
If it's not running in the browser it should simply never be JS. That is the only environment where you are stuck with it. Almost anything else is better but you should probably using one of Java/C# or Kotlin/Rust in 2022.