hyperdimensional-computing / torchhd

Torchhd is a Python library for Hyperdimensional Computing and Vector Symbolic Architectures
https://torchhd.readthedocs.io
MIT License
233 stars 24 forks source link

Add binary hypervector support #69

Closed mikeheddes closed 2 years ago

mikeheddes commented 2 years ago

We will move the discussion of binary hypervector implementation to this issues such that #25 can focus on the complex representation and varying bit-widths.

hv = torchhd.random_hv(10, 1000, dtype=torch.bool)  # creates a boolean tensor
torchhd.bind(hv[0], hv[1])  # performs XOR
torchhd.bundle(hv[0], hv[1], hv[2])  # needs three inputs to calculated the majority function