0
Working with PyTorch tensors, i need to do following operation:
def pairs_by_flags(self, x_batch, y_batch, max_flag):
#split x_batch on pairs
sizes = (x_batch.size(0)//2, *x_batch.size()[1:] )
items_pos = torch.zeros((max_flag,), dtype = torch.long, device = x_batch.device)
x_...