Three months ago I made a post here with an early version of this project, and received some great feedback! One of the most asked features was GPU support, so I added it alongside many other improvements. Hope you like it!
Thanks for the feedback, glad you liked it!
It does, and they work similarly to their PyTorch counterparts. The explanation is on the “Running it Yourself” part of the README.
I’m planning on creating a small article explaining the syntax and the functionalities of the Deep Learning library. I think that could be a useful learning tool, do you think it would help?
Thats true, it’s a limitation of working between these languages. I tried to mitigate it by using clear JSDoc, so that each variable pops up alongside an explanation when calling a function.
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.
I centralized the entire backpropagation around the Operation objects. They store the data about the forward prop in the cache, and serve as the connections in the graphs between tensors. Each tensor has a “parent”, “child” and “operation”. These store who generated the tensor, what tensors it generated, and how it was generated (what operation). I could store the backward function inside of each tensor instead of an Operation object, but I chose the slightly more verbose option because I think it is a little more interpretable and simpler to add new operations.
I can try implementing it in the future lol
It would surely be a quality of life improvement.
But with the current tools, I tried my best to make the syntax as similar as possible to PyTorch’s!
Could not agree more hahaha! I tried to work around it building methods like “torch.add(a, b)” for operator overloading and “torch.at(index)” for slicing. But it’s definitely not as seamless as these features you proposed.
Now that I've tried Javascript, I could branch out to other languages in the future. I chose Javascript initially for its popularity and easy use on web browsers.
That’s true. I myself learned ML in python first, and I’m just now trying to implement some stuff in JavaScript.
I guess it could be useful to make web integration with neural networks easier in this case, or at least as an educational package!
I am currently studying Typescript and other JavaScript libraries to improve the library’s performance. So adding GPU support is in sight in the future.
Thanks for the tip! I will look into your project, for sure! I am still a beginner on Typescript, but when I get the hang of it, I think I might refactor my package to Typescript. Again, thanks for the tip!