I want to feed part of the model’s output to auxiliary loss.
With it Im getting the error
x = torch.rand(32, 128, 1000)
lens = torch.randint(0, 1000, (32,))
mask_start = (torch.rand(32) * (lens - 64)).long()
x[:,:,mask_start:mask_start+64]

TypeError: only integer tensors of a single element can be converted to an index