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`.
Posts by Botos Csabi
1 year ago
1
0
0
0
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, :]
1 year ago
1
0
1
0
Yay 🦜
Heading to Vancouver on Monday to present my first ever
@neuripsconf.bsky.social paper.
I am super duper excited to finally join the cool kids’ gang.
Check out the tutorial I procrastinated over for 3 months:
youtu.be/EbPrlGkLxGo
1 year ago
2
0
0
0