You could calculate the mean in the “kfold” dimension as given in this code snippet:
total_preds = []
for _ in range(4): # kfold loop
    preds = []
    for _ in range(730): # data loop
        p = torch.randn(3)
        preds.append(p)
    preds = torch.stack(preds)
    total_preds.append(preds)

total_preds = torch.stack(total_preds)
print(total_preds.shape) # [4, 730, 3]
mean_preds = total_preds.mean(0)
print(mean_preds.shape) # [730, 3]