hyperdimensional-computing / torchhd

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

Allow custom dtype for some VSA similarity functions #160

Closed mikeheddes closed 1 year ago

mikeheddes commented 1 year ago

Description

With this PR a dtype can be specified for the return of the MAPTensor, BSBCTensor, and BSCTensor. The computation of the similarity value is also performed in this dtype. One therefore has to be careful not to make the precision too low to avoid overflows. This PR closes #158 .

Checklist