Hello,
I am quite new in Torch implementation, I meet a problem while running:

        data_normal, target_normal = next(dataiter_normal)
        data_normal = Variable(data_normal.cuda(async=True))		
        target_normal = Variable(target_normal.cuda(async=True))

        idx_rand = Variable(
            torch.randperm(batch_size * 2).cuda(async=True))
        
        data = torch.cat([data_tumor, data_normal])[idx_rand]
        target = torch.cat([target_tumor, target_normal])[idx_rand]
        output = model(data)
        loss = loss_fn(output, target)

it gives me error:
data = torch.cat([data_tumor, data_normal])[idx_rand]
RuntimeError: index 19 is out of bounds for dimension 0 with size 18
Could someone help me to debug this error ?
Thanks  alot