PyTorch code for ML algorithms for edge devices developed at Microsoft Research India.
Project description
Edge Machine Learning: Pytorch Library
This package includes PyTorch implementations of following algorithms and training
techniques developed as part of EdgeML. The PyTorch graphs for the forward/backward
pass of these algorithms are packaged as edgeml_pytorch.graph and the trainers
for these algorithms are in edgeml_pytorch.trainer.
- Bonsai:
edgeml_pytorch.graph.bonsaiimplements the Bonsai prediction graph. The three-phase training routine for Bonsai is decoupled from the forward graph to facilitate a plug and play behaviour wherein Bonsai can be combined with or used as a final layer classifier for other architectures (RNNs, CNNs). Seeedgeml_pytorch.trainer.bonsaiTrainerfor 3-phase training. - ProtoNN:
edgeml_pytorch.graph.protoNNimplements the ProtoNN prediction functions. The training routine for ProtoNN is decoupled from the forward graph to facilitate a plug and play behaviour wherein ProtoNN can be combined with or used as a final layer classifier for other architectures (RNNs, CNNs). The training routine is implemented inedgeml_pytorch.trainer.protoNNTrainer. - FastRNN & FastGRNN:
edgeml_pytorch.graph.rnnprovides various RNN cells --- including new cellsFastRNNCellandFastGRNNCellas well asUGRNNCell,GRUCell, andLSTMCell--- with features like low-rank parameterisation of weight matrices and custom non-linearities. Akin to Bonsai and ProtoNN, the three-phase training routine for FastRNN and FastGRNN is decoupled from the custom cells to enable plug and play behaviour of the custom RNN cells in other architectures (NMT, Encoder-Decoder etc.). Additionally, numerically equivalent CUDA-based implementationsFastRNNCUDACellandFastGRNNCUDACellare provided for faster training.edgeml_pytorch.graph.rnn.edgeml_pytorch.graph.rnn.Fast(G)RNN(CUDA)provides unrolled RNNs equivalent tonn.LSTMandnn.GRU.edgeml_pytorch.trainer.fastmodelpresents a sample multi-layer RNN + multi-class classifier model. - S-RNN:
edgeml_pytorch.graph.rnn.SRNN2implements a 2 layer SRNN network which can be instantied with a choice of RNN cell. The training routine for SRNN is inedgeml_pytorch.trainer.srnnTrainer.
Usage directions and examples notebooks for this package are provided here.
Installation
It is highly recommended that EdgeML be installed in a virtual environment. Please create a new virtual environment using your environment manager (virtualenv or Anaconda). Make sure the new environment is active before running the below mentioned commands.
Use pip to install requirements before installing the edgeml_pytorch library.
Details for cpu based installation and gpu based installation provided below.
CPU
pip install -r requirements-cpu.txt
pip install -e .
Tested on Python3.6 with >= PyTorch 1.1.0.
GPU
Install appropriate CUDA and cuDNN [Tested with >= CUDA 8.1 and cuDNN >= 6.1]
pip install -r requirements-gpu.txt
pip install -e .
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edgeml_pytorch-0.3.0.tar.gz.
File metadata
- Download URL: edgeml_pytorch-0.3.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12bc86fb187c18e08a8c46fbd5f65b3e48d443e4704fc06965a88a0dac575155
|
|
| MD5 |
b52c98e053e9819b45fc87836d4427d5
|
|
| BLAKE2b-256 |
97e2869ead89db008df4b5dfc007fed6d009f09749a903ee5fce05f1defeef62
|
File details
Details for the file edgeml_pytorch-0.3.0-py3-none-any.whl.
File metadata
- Download URL: edgeml_pytorch-0.3.0-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c96f13bc8dbad30127077f0d9cd0056f94ad3f1391e9daedd807cced6fc0da8
|
|
| MD5 |
f538a040ac0754b63937884ac406cfa3
|
|
| BLAKE2b-256 |
06ba3033a65e13abf2d31444a3963b36d1edab6ebb65954a94124404dadc69fb
|