Botos Csabi
banner
botoscsabi.bsky.social
Botos Csabi
@botoscsabi.bsky.social
Fresh DPhil from @oxfordtvg.bsky.social
Working on low-latency/low-resource AI
Neuroscience wannabe

https://botcs.github.io/
that was my first guess as well, but that only works with identical indices between source and target.

if the max(K):T ratio is low then I guess it worths 1) gathering into an intermediate tensor 2) shuffling the values 3) scattering to x`.
December 8, 2024 at 11:25 AM
I think the best solution really depends on the ratios 1) max(K):T 2) N:D.
since K can vary for different {n}s I would start with
- find the largest K and allocate x`=torch.zeros(N, max_K+1, D)
- iterate over N
- create a src index [0, t_1 .. t_K] and trg [t_1, .., T-1]
- x`[n, src, :]=v[n, trg, :]
December 8, 2024 at 11:13 AM