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 cleanup function #21

Closed mikeheddes closed 2 years ago

mikeheddes commented 2 years ago

functional.cleanup(input: Tensor, memory: Tensor, threshold=0.0) -> Tensor returns the hypervector in memory that is most similar to the input hypervector. If the similarity is less than the threshold an IndexNotFound error should be thrown.