Repository navigation
Node.js (JavaScript) Wrapper API #37
Description
Activity
- changed the title
[-]JavaScript (Node.js) Wrapper[/-][+]JavaScript (Node.js) Wrapper API[/+]on Nov 9, 2015 +1!
Reacted by Kim Aarnseth, Jonathan Chen, Mansa Dev, Jaime, Vijay, Gaurav Misra, Rin Tepis, Cristiano Belloni, Valentin, nyz and 40 moreReacted by Andrew Gertjejansen, Sergey and up-to-youReacted by Andrew Gertjejansen, Sergey, up-to-you and Loreto ParisiReacted by Andrew Gertjejansen, Sergey and up-to-you+1
Reacted by Kim Aarnseth, Rin Tepis, Cristiano Belloni, nyz, David Awad, Sprudge, Kilian Ciuffolo, Hannan Ali, Basit, Olivier Tassinari and 16 more👍
Reacted by Kim Aarnseth, Rin Tepis, Cristiano Belloni, Alex Caudill, David Awad, Sprudge, Kilian Ciuffolo, Hannan Ali, Basit, Olivier Tassinari and 15 more+1
Reacted by Kim Aarnseth, Rin Tepis, Cristiano Belloni, David Awad, Sprudge, Kilian Ciuffolo, Hannan Ali, Basit, Olivier Tassinari, Chanlito and 15 moreJust what I was searching for. 👍
As quoted from the offical website http://www.tensorflow.org/
we’re hoping to entice you to contribute SWIG interfaces to your favorite language -- be it Go, Java, Lua, Javascript, or R.
I am new to this whole SWIG thing but searched around and found this. http://www.swig.org/Doc3.0/Javascript.html
Not really sure how this works. Do we need to write swig interface file specifically for Javascript or is it auto-generated when running some commands or is somebody already working on this (this would be awesome) ?
Reacted by Elvis Teixeira, Nicolás Narváez, Kilian Ciuffolo, daniel baak, Odyssey, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Nick K. and 5 more+1 👍
Reacted by Kim Aarnseth, Rin Tepis, Cristiano Belloni, Kilian Ciuffolo, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Manuel Warum, song and 3 more+1
Reacted by Kim Aarnseth, Rin Tepis, Kilian Ciuffolo, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Manuel Warum, Sean Prashad and up-to-you+1
Reacted by Kim Aarnseth, Rin Tepis, Kilian Ciuffolo, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Manuel Warum, song, Sean Prashad and 1 more+1
Reacted by Kim Aarnseth, Rin Tepis, Kilian Ciuffolo, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Manuel Warum, song and Sean Prashad+1
Reacted by Kim Aarnseth, Rin Tepis, Kilian Ciuffolo, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, song, Sean Prashad and up-to-you👍
Reacted by Kim Aarnseth, Rin Tepis, Kilian Ciuffolo, Olivier Tassinari, Bagus, Lucas Bento, Manuel Warum, song, Sean Prashad and up-to-you👍
Reacted by Kim Aarnseth, Rin Tepis, Kilian Ciuffolo, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Manuel Warum, song, Sean Prashad and 2 more+1!
Just starting out on one, but new to writing a nodejs addon. Checking out the swig interface files to see if they're going to be helpful, or if I should just use the c++ API.
Reacted by Kim Aarnseth, Rin Tepis, Sorin Mihai Irimies, Olivier Tassinari, Victor Bianchi, Bagus, Lucas Bento, Manuel Warum, song and Sean Prashad232 remaining items
Load more actions@nuchi, so did you compile the necessary TensorFlow code from the C API to WebAssembly? Or are you using TensorFlow.js?
@lastmjs I explain in more detail in the link I provided. Short version: I added Webassembly as an XLA compilation target. I did not use Tensorflow.js in any way.
Reacted by Jordan Last and Huan Li@nuchi Great work! and I know another WebAssemble research on TensorFlow at here:
https://medium.com/@tomasreimers/compiling-tensorflow-for-the-browser-f3387b8e1e1cGlad to see that there's official progress on this. I'd love to have fast, parallel GPU compute power at my fingertips with the ease and composability of JS.
I started working on a NodeJS binding for TensorFlow a while ago, but a haven't had much free time to devote to it lately.
The concept is similar to @jart's suggested approach.
I had three goals in mind for the project:
1. Don't require building or installing tensorflow
Instead, it should download and use the pre-built, multi-platform python binaries and download any needed source files on the fly.
2. Don't require a complete C++ or JS reproduction or abstraction of the API
Instead, it should provide a complete 1-to-1 interface with the C API, providing convenient JS abstractions as much as possible.
3. Don't maintain the C API bindings by hand
Instead, it should use a swig script to map the core data structures between Tensorflow/stdc++/V8/node and the rest will follow.
I got pretty far along with this, but last I remember a was having issues with TF_Session related segfaults.
Right now it's just collecting dust, so if someone wants to jump in and help with this I'd gladly accept PRs.
Closing as this is resolved
Reacted by Pavel Kukov and Huan LiReacted by Pavel Kukov- added a commit that references this issue
on Dec 6, 2019 - added a commit that references this issue
on Feb 1, 2021 - added 5 commits that reference this issue
on Apr 9, 2025
Because JavaScript is Awesome