A JavaScript library like PyTorch, built from scratch.
npm install js-pytorch

- JS-PyTorch is a Deep Learning JavaScript library built from scratch, to closely follow PyTorch's syntax.
- This library has GPU support, using GPU.js.
- If you want to run it yourself, check out the Documentation.
- Try out the Web Demo!
> Note: You can install the package locally with: npm install js-pytorch
Implemented Tensor Operations:
- Add
- Subtract
- Multiply
- Divide
- Matrix Multiply
- Power
- Square Root
- Exponentiate
- Log
- Sum
- Mean
- Variance
- Transpose
- At
- MaskedFill
- Reshape
Implemented Deep Learning Layers:
- nn.Linear
- nn.MultiHeadSelfAttention
- nn.FullyConnected
- nn.Block
- nn.Embedding
- nn.PositionalEmbedding
- nn.ReLU
- nn.Softmax
- nn.Dropout
- nn.LayerNorm
- nn.CrossEntropyLoss
* Installation
* Running it Yourself
* Simple Autograd Example
* Complex Autograd Example (Transformer)
* Saving and Loading models
* Distribution & Devtools
* Future Work
- On MacOS, Windows, and Ubuntu, you can install the library with npm install js-pytorch.
- On Windows, if you run into an error, you might need to install the latest version of Visual Studio, including the "Desktop development with C++" workload.
- To run in the Browser, npm install the latest version of JS-PyTorch, and link the distribution files in your HTML file:
``html`
- After that, you can use JS-PyTorch freely in any