So here I am wondering why i cannot write the following
                labels = labels.byte()     # shape [20]
                pred = pred.byte()    # shape [20]
                print('labels', labels.shape)
                print('pred', pred.shape)
                true_positives = torch.zeros_like(labels)
                true_positives[labels[pred] == 1] = 1
             


runtime error: the shape of the mask[19] at index 0 does not match the shape of the indexed tensor [20] at index 0

I am confused oO
If this is not the correct way to index into tensors, what is ?
thank you