GithubHelp home page GithubHelp logo

neuralhd's Introduction

onlinehd

Authors: Alejandro Hernández Cano, Mohsen Imani.

Installation

In order to install the package, simply run the following:

pip install onlinehd

Visit the PyPI project page for more information about releases.

Documentation

Read the documentation of this project.

Quick start

The following code generates dummy data and trains a OnlnineHD classification model with it.

>>> import onlinehd
>>> dim = 10000
>>> n_samples = 1000
>>> features = 100
>>> classes = 5
>>> x = torch.randn(n_samples, features) # dummy data
>>> y = torch.randint(0, classes, [n_samples]) # dummy data
>>> model = onlinehd.OnlineHD(classes, features, dim=dim)
>>> if torch.cuda.is_available():
...     print('Training on GPU!')
...     model = model.to('cuda')
...     x = x.to('cuda')
...     y = y.to('cuda')
...
Training on GPU!
>>> model.fit(x, y, epochs=10)
>>> ypred = model(x)
>>> ypred.size()
torch.Size([1000])

For more examples, see the example.py script. Be aware that this script needs pytorch, sklearn and numpy to run.

Citation Request

If you use onlinehd code, please cite the following paper:

  1. Alejandro Hernández-Cano, Namiko Matsumoto, Eric Ping, Mohsen Imani "OnlineHD: Robust, Efficient, and Single-Pass Online Learning Using Hyperdimensional System", IEEE/ACM Design Automation and Test in Europe Conference (DATE), 2021.

downdrafts create improvement 1000<1024

neuralhd's People

Watchers

Bobby Missirian avatar

Forkers

xiangshenggu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.