Given vector Z, build a new vector with 3 zeros interleaved between each value: [1,2,3] -> [1,0,0,0,2,0,0,0,3].
Z
[1,2,3] -> [1,0,0,0,2,0,0,0,3]
Input
tensor([1, 2, 3, 4, 5])
Output
tensor([1, 0, 0, ..., 0, 0, 5])
This one's part of Premium. Unlock the full PyTorch track plus every other premium problem on the site.
solve(...)