Skip to content

Commit 3396133

Browse files
committed
Rename to Torchhd in README and add logo
1 parent ce6e788 commit 3396133

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
<h1 align="center">
2-
<a href="https://mikeheddes.github.io/hdc-lib">Hyperdimensional Computing Library</a><br/>
3-
4-
</h1>
51
<p align="center">
62
<a href="https://github.com/mikeheddes/hdc-lib/blob/main/LICENSE"><img alt="GitHub license" src="https://img.shields.io/badge/license-MIT-orange.svg?style=flat" /></a>
73
<a href="https://pypi.org/project/hdc/"><img alt="pypi version" src="https://img.shields.io/pypi/v/hdc.svg?style=flat&color=orange" /></a>
@@ -10,14 +6,22 @@
106
</a><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" />
117
</p>
128

13-
This is a Python library for Hyperdimensional Computing.
9+
<div align="center">
10+
<a href="https://mikeheddes.github.io/hdc-lib">
11+
<img width="380px" alt="Torchhd logo" src="./resources/torchhd-logo.svg" />
12+
</a>
13+
</div>
14+
15+
# [Torchhd](https://mikeheddes.github.io/hdc-lib)
16+
17+
Torchhd is a Python library for Hyperdimensional Computing.
1418

15-
* **Easy-to-use:** This library makes it painless to develop a wide range of Hyperdimensional Computing (HDC) applications and algorithms. For someone new to the field we provide Pythonic abstractions and examples to get you started fast. For the experienced researchers we made the library modular by design, giving you endless flexibility to prototype new ideas in no-time.
19+
* **Easy-to-use:** Torchhd makes it painless to develop a wide range of Hyperdimensional Computing (HDC) applications and algorithms. For someone new to the field we provide Pythonic abstractions and examples to get you started fast. For the experienced researchers we made the library modular by design, giving you endless flexibility to prototype new ideas in no-time.
1620
* **Performant:** The library is build on top of the high-performance PyTorch library, giving you optimized tensor execution without the headaches. Moreover, PyTorch makes it effortless to accelerate your code on a GPU.
1721

1822
## Installation
1923

20-
The library is hosted on PyPi and Anaconda, use one of the following commands to install:
24+
Torchhd is hosted on PyPi and Anaconda, use one of the following commands to install:
2125

2226
```bash
2327
pip install hdc
@@ -29,31 +33,31 @@ conda install -c mikeheddes hdc
2933

3034
## Documentation
3135

32-
You can find the library's documentation [on the website](https://mikeheddes.github.io/hdc-lib).
36+
You can find documentation for Torchhd [on the website](https://mikeheddes.github.io/hdc-lib).
3337

3438
## Examples
3539

3640
We have several examples [in the repository](/examples/). Here is a simple one to get you started:
3741

3842
```python
39-
import hdc
4043
import torch
44+
import torchhd
4145

4246
d = 10000 # number of dimensions
4347

4448
### create a hypervector for each symbol
4549
# keys for each field of the dictionary: fruit, weight, and season
46-
keys = hdc.functional.random_hv(3, d)
50+
keys = torchhd.functional.random_hv(3, d)
4751
# fruits are: apple, lemon, mango
48-
fruits = hdc.functional.random_hv(3, d)
52+
fruits = torchhd.functional.random_hv(3, d)
4953
# there are 10 weight levels
50-
weights = hdc.functional.level_hv(10, d)
54+
weights = torchhd.functional.level_hv(10, d)
5155
# the for seasons: winter, spring, summer, fall
52-
seasons = hdc.functional.circular_hv(4, d)
56+
seasons = torchhd.functional.circular_hv(4, d)
5357

5458
# map a float between min, max to an index of size 10
5559
# we map the 10 weight levels between 0 to 200 grams
56-
weight_index = hdc.functional.value_to_index(149.0, 0, 200, 10)
60+
weight_index = torchhd.functional.value_to_index(149.0, 0, 200, 10)
5761

5862
values = torch.stack([
5963
fruits[0],
@@ -62,7 +66,7 @@ values = torch.stack([
6266
])
6367
# creates a dictionary:
6468
# record = key[0] * value[0] + key[1] * value[1] + key[2] * value[2]
65-
record = hdc.functional.struct(keys, values)
69+
record = torchhd.functional.struct(keys, values)
6670

6771
#### Similar Python code
6872
#

resources/torchhd-logo.png

27.4 KB
Loading

resources/torchhd-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)