hyperdimensional-computing / torchhd

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

Allow custom dtype for some VSA similarity functions #160

Closed mikeheddes closed 9 months ago

mikeheddes commented 9 months 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