Skip to main content

A framework for creating Rust machine learning models that are trained in Python.

Project description

Blowtorch

Blowtorch is a Python package that allows you to train machine learning models and run inference in pure Rust. This is done through a specifying the model once in a JSON file. Blowtorch then exports your specification into Rust and Python models. You can train the Python model as you prefer, and Blowtorch can be run again to share the weights to Rust.

An example application built with a predecessor of Blowtorch is ZipNet, which is a neural-network based compression algorithm run entirely in the browser. We built Blowtorch as we could not find any easily extensible machine learning frameworks that could be compiled to WebAssembly.

Advantages over similar packages

  • Inference is in pure Rust, meaning your model can run anywhere that Rust runs. You can for example compile it to WebAssembly.
  • New layers can be implemented very easily, as one just has to write a forward pass in Rust
  • Training is completely in Python, meaning you can use whatever training procedures you like
  • Complex networks can be built by splitting the architecture into simpler modules, which are combined together by some glue code

Our documentation can be found at https://blowtorch.readthedocs.io/en/latest/.

Features

  • Export and import trained weights
  • Implementations for the following layers:
    • Conv
    • ConvT
    • ReLU
    • GDN
    • iGDN
    • Flatten
    • Linear
  • Easy-to-use example
  • Possibilities to extend the framework
  • Documentation for Python & Rust

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blowtorch-py-0.1.3.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

blowtorch_py-0.1.3-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file blowtorch-py-0.1.3.tar.gz.

File metadata

  • Download URL: blowtorch-py-0.1.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.13 Darwin/21.5.0

File hashes

Hashes for blowtorch-py-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2584b76b751952dc0151be81225d5e0514628732168f3189318efa7f86bf7507
MD5 e5a2c5f1e6ea23e13dc8b6a4bb9c1b1e
BLAKE2b-256 de60b87aa850815dc0dba74cde53b956d85fe6a17c99fe6b01f73da8cb544e07

See more details on using hashes here.

File details

Details for the file blowtorch_py-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: blowtorch_py-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.13 Darwin/21.5.0

File hashes

Hashes for blowtorch_py-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ae1296ccbbde54c2dca064c234e77bb5b6bb141205b716a024d311b34316c289
MD5 a011b07a780b977b3f965887d7054c2b
BLAKE2b-256 4fd2dfb307cb46a3d881646b6f44d022922aea85a83f1f8859c4b5ee589b14d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page