Hi,
Does not paths contain image names already? if yes so, then you can stack column wise then convert it to a matrix.
batch_size = 10
paths = np.array(['names']*batch_size).reshape(-1, 1)
preds = torch.randint(0, 5, (batch_size, )).view(-1, 1)
names_preds = np.hstack((paths, preds.numpy()),)

Bests