PyTorch code for ML algorithms for edge devices developed at Microsoft Research India.
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.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). See
edgeml_pytorch.trainer.bonsaiTrainerfor 3-phase training.
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 in
- FastRNN & FastGRNN:
edgeml_pytorch.graph.rnnprovides various RNN cells --- including new cells
FastGRNNCellas well as
LSTMCell--- 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 implementations
FastGRNNCUDACellare provided for faster training.
edgeml_pytorch.graph.rnn.Fast(G)RNN(CUDA)provides unrolled RNNs equivalent to
edgeml_pytorch.trainer.fastmodelpresents a sample multi-layer RNN + multi-class classifier model.
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 in
Usage directions and examples notebooks for this package are provided here.
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
Details for cpu based installation and gpu based installation provided below.
pip install -r requirements-cpu.txt pip install -e .
Tested on Python3.6 with >= PyTorch 1.1.0.
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size edgeml_pytorch-0.3.0-py3-none-any.whl (29.8 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size edgeml_pytorch-0.3.0.tar.gz (24.9 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for edgeml_pytorch-0.3.0-py3-none-any.whl