Hello,
I’ve got problem to which I can’t find the proper answer.
I need to create very large tensors (with zeros) - my_tensor.shape = [256, 3, 500000] and assign to specific indexes “1”. I have a tensor with .shape = [256, 3] containing indexes at which should I assign “1” to every tensor inside my_tensor.
So I was doing it in the loop one by one and concatenate to create 256 sized batch (which is time consuming), and now I’m thinking if there is possibility to make it faster in that way:
my_tensor = torch.zeros([256, 3, 500000])
my_tensor[#here some magic indexes] = 1

Could you suggest me some efficient way to solve my problem?
Best regards