torchhd icon indicating copy to clipboard operation
torchhd copied to clipboard

Previous value passing in Structures design

Open mikeheddes opened this issue 3 years ago • 0 comments

This issue is to discuss design improvements around the access to the exact previous hypervector value in the data structures. Right now we require the user to pass the previous version for every mutation method. We can think of designs to provide this behavior. For instance:

hv = torchhd.random_hv(10, 10000)
S = torchhd.structures.Sequence.from_tensor(hv)
S.replace(2, hv[2], hv[5])

Could be:

hv = torchhd.random_hv(10, 10000)
S = torchhd.structures.Sequence.from_tensor(hv)
S.replace(2, hv[5])  # not passing the old value

however this requires the data structure to have access to the exact hypervector. The discussion here is how to implement that in a way that give ample freedom to the user to experiment with various cleanup memories.

mikeheddes avatar May 24 '22 06:05 mikeheddes