wasm-nn

Crates.iowasm-nn
lib.rswasm-nn
version0.1.0
sourcesrc
created_at2022-12-17 18:42:46.565047
updated_at2022-12-17 18:42:46.565047
descriptionwasm-nn is a deep learning framework for WebAssembly.
homepage
repositoryhttps://github.com/0xArty/wasm-nn
max_upload_size
id740001
size10,691
(0xArty)

documentation

https://docs.rs/wasm-nn

README

wasm-nn: A Deep Learning Framework for WebAssembly

wasm-nn is a deep learning framework for WebAssembly (Wasm) that allows you to train and deploy neural networks in the browser or on the server. It has Python bindings that are compatible with PyTorch, so you can use your existing PyTorch code and models with wasm-nn.

Features

  • Compiles and runs on Wasm for fast and efficient execution
  • Python bindings for easy integration with PyTorch
  • Supports a wide range of layer types and optimization algorithms
  • Easy to use and well-documented API

Installation

To install wasm-nn, you need to have Rust and wasm-pack installed on your system. Then, you can install wasm-nn with the following command:

wasm-pack install wasm-nn

Usage

[dependencies]
wasm-nn = "0.1.0"

Then, you can use it in your Rust code like this:

extern crate wasm_nn;

use wasm_nn::tensor::Tensor;
use wasm_nn::optim::SGD;
use wasm_nn::nn::{Module, Linear};

fn main() {
    let mut model = Linear::new(2, 3);
    let optimizer = SGD::default();

    // Train the model on some data...
}

To use wasm-nn with Python, you can install the Python package with pip:

pip install wasm-nn

Then, you can use it in your Python code like this:

import wasm_nn

model = wasm_nn.Linear(2, 3)
optimizer = wasm_nn.SGD()

# Train the model on some data...

For more details on how to use wasm-nn, see the API documentation.

Contributing

We welcome contributions to wasm-nn! If you'd like to contribute, please read our contribution guidelines and open a pull request.

License

wasm-nn is licensed under the MIT License.

Acknowledgements

wasm-nn is built on top of the WasmBindgen project, which makes it easy to interface between Rust and JavaScript. We are grateful to the WasmBindgen team and community for their efforts in making Wasm development a pleasure.

Commit count: 5

cargo fmt